There are quite a few threads on this subject. It's impossible to know what caused your shimmy, but the main things to keep in mind is that you need to be relaxed, your weight needs to be back, and your knees should be in on the top tube. If you tense up and let your bike go into a harmonic vibration (which is what a shimmy essentially is), your bike will go into what I like to call the death dance. It's really no fun.