If the drum system is not itself damaged then you may be overloading the machine with clothes. When the drum spins fast at the end of a wash cycle, the laundry load needs to disperse evenly around the stainless drum and if theres too much in there it will have the shaking effect. Washing machines also have suspension systems that; much like a car, absorb the shock of the drums movement. An older, worn machine may have a problem with its suspension which also could be the cause of excessive vibration!