This is a difficult question for me to answer since I am not privy to your medical history, nor am I able to take a history or perform a thorough exam. Of course prevention of re-exposure to the allergen that caused anaphylaxis is the best way to ensure that you will not have another significant potentially life threatening reaction.
As you well know, the human body can have multiple different "types" of allergic reactions. In fact the medical term is a hypersensitivity reaction, and there are type 1-4. Anaphylaxis is an overly strong type 1 hypersensitivity reaction that involves multiple organ systems. A type 1 hypersensitivity reaction means that there is release of histamine by mast cells and basophils which is mediated by IgE. Allergy shots
are given to desensitize the overactive immune response to certain allergens (as in seasonal allergies). A similar process of immunotherapy can be used to attenuate the immune response to the allergen that caused anaphylaxis in a particular person.
What I'm not sure of is whether you have actually had an anaphylactic reaction in the past, and if you did whether your allergy shots were directed appropriately to take this into account. I would recommend that you discuss this question with your allergist who will have your complete medical records. I hope that this helps.