Stumbled across this by accident one day.

Our front load washer was shaking quite a bit from time to time to the point our attached-house neighbor complained to us. I had two bottles of detergent in hand, and placed them on top of the front loader for a moment to free my hands, and noticed the vibration dropped off quite a bit. I filled the top with bottles and the vibration was virtually eliminated.

Now, we place all extra bottles of detergent, softener and even some plain old filled bottles of water as ballast on top of the machine.

The liquids act like a shock absorber and soak up the energy of the vibration, dramatically reducing and virtually eliminating washer vibration most of the time. The bottles will walk around a bit on the washer, so make sure they are big enough not to fall down in some hard-to-reach side gap around the machine.