Pack all the bottles securely in a box. Shake the box.
Forty 40ml bottles will only weigh a few pounds, and unless these bottles need serious shaking, an automated rig seems like overkill - surely you can spend 1 minute every few days shaking a box of bottles? If you do need to shake them longer and your arms are getting tired, consider other means of shaking - perhaps you could bounce the box on your knees while you watch TV, or toss the box in a backpack and go for a jog with it.