What can I do if I am allergic to onions?

Food Allergy. Avoid. Unless the allergy is minor, then you can try to limit their use or the manner in which they are made.
Allergy shot. That depends what your reaction is and how severe. If an anti-allergy med works (for a very mild symptom), you could try that. Otherwise, either avoid onion or see an allergist about getting desensitization therapy (allergy shots).