I bought a pair of Shimano indoor cycling shoes with two hole cleats to wear during my spin classes. Unfortunately, during my classes, I snap out of the clips. I know part of it must be my form but I think another part is that the clip isn't held in like mountain bike shoes are. Is there a way to buy an attachment to make mine more sturdy. I know there must be something, but I can't seem to find it!
On Shimano SPD pedals, you can sometimes adjust the tension for how tightly they clip in (likely via a hex bolt). If the tension is too low, your feet will be too easy to pop out, whereas if its too high, you won't easily be able to get out (which isn't a problem on an indoor cycling setup). Try playing with this setting to see if you stay clipped in (turning the bolt clockwise should increase the tension).
Also, there are two types of cleats available -- single release (Shimano SH-51) which only release by turning your heel out and multi-release (Shimano SH-56) which release by turning in any direction. It shouldn't matter which one you use for indoor cycling (SH-56 is probably preferable for most people) but SH-51 might be an option if you're having trouble with SH-56.
If you can't get the tension to adjust and swapping the cleats doesn't work (if you're using SH-56), normally indoor cycling bikes have toe clips available as well. You may want to use those. And work on your form.
@Batman has already explained how to adjust SPD release tension (+1 to him).
Pedalling smoother will also help.
Try to use you ankles more, so that you are trying to drive the pedals through all 360°.
And try to pedal straight, as in keep your feet pointed directly forward all the time. Keeping your knees straight can help with this, and focussing on a distant point can help too.
As with any technique training (whether it's cycling, swimming, squash, tennis, skiing, whatever) you'll need to focus just on technique for a while, and ignore speed and power. When you think you've improved the technique, test it by applying more power.
Because the new technique uses different muscles, build it up carefully to avoid soreness.
Devil's advocate here, but why not try using flat pedals on your spin classes? It would teach you correct technique by spinning in "circles".
But anyway, the previous answers have hit it right on the head, it is either you are using a multi-release cleat or the tension in the pedals are too low or that you are "jerky" in your pedalling movements. remember, pedal in circles and make it smoother :)