Correct. The shockable rhythms are ventricular fibrillation and ventricular tachycardia (racing heart). Fortunately these rhythms occur in many heart attacks.
Unfortunately PEA and asystole (flatline) do too, and shocking won't fix those -- despite what movies and TV would often have you believe.