I can see why there's confusion. What happens on TV? A patient's heart stops and everyone rushes to bring out the paddles to bring him back.
Actually, once the heart has stopped (asystole), defibrillation is not used and can make recovery impossible. Automatic defibrillators will not advise a shock when there is asystole and a doctor will not shock either. Defibrillation only works when there is some sort of electrical rhythm, whether it is v-tach, v-fib, or an atrial rhythm.
Most defibrillators are programmed to shock arrhythmias around 180-200+/bpm with a rapid pacing to try and stop it, then followed by high voltage shock if the pacing (ATP) doesn't work. Cardioversion is also used like tom_h explained.
Yes, synchronized electrical cardioversion is a device that syncs itself to the patient's heart rhythm, and fires at precisely at the correct moment to terminate episodes of arrhythmia, including ventricular tachycardia, and on occasion supraventricluar tachycardia. We had one forum member who had cardioversion in the last couple of days. There are several excellent videos on YouTube that demonstrate cardioversion.