Usually it's the spin-enable switch or one of the out of balance switches. Remove the front and lift the top. There's a plug towards the back with two blue wires. Check for continuity, if it's 0 ohms, the out of balance switches are good. Start the spin cycle. Watch for the plunger to depress the switch on the right side of the door latch. If it depresses the switch, check for continuity. If it doesn't depress the switch, you will need to replace some latch components.