The way a defibrillator works with a stopped heart is by analysing, and it that way it does "help it beat again". But it won't shock a stopped heart. The name says it all; it de-fibrillates. The heart has to be fibrillating for it to be de-fibrillated; the shock can only correct an archaic rythmn, not the absence of rythmn.
If there's no electric activity, the person needs meds like epinephrine, not a shock.
The thing with TV shows, is that they often show a flat line on an ECG monitor and then shock the patient, which is basically useless except at burning the patient's skin and stopping effective compressions during CPR. The kind of ECG we should see during a shock is atrial fribrillation (a-fib) and ventricular fibrillation (v-fib). Those should have a very wavy ECG line.
Source: am nurse (edit: a better nurse corrected me on some differences between shocking for a defibrillation and for a cardioversion, go read their comment)
Thanks for clarifying! I'm at the end of my cert. for arythmias and sometimes the cardioversion and defib get jumbled up since they're both electrical processes (albeit at very different strength).