The only sure way to prevent an allergic reaction to shellfish is to avoid shellfish. But despite your best efforts, you may come into contact with shellfish.
If you have a severe allergic reaction to shellfish (anaphylaxis), you'll likely need an emergency injection of epinephrine (adrenaline). If you're at risk of anaphylaxis to shellfish, your health care provider can give you a prescription in advance and explain how and when to give the injection. Regularly check the expiration date on the packaging to make sure it's current.
Carry injectable epinephrine (Auvi-Q, EpiPen, others) with you at all times. Epinephrine is typically given at the first sign of an allergic reaction. A second dose may be needed if symptoms recur. After you use epinephrine, seek emergency medical care, even if you start to feel better.