Food allergies can arise due to a leaky gut which allows partially-digested food proteins into the bloodstream. A more direct route is via an injection.
Institute of Medicine (IOM): Food proteins present in vaccines cause the development of food allergies – “Adverse events on our list thought to be due to IgE-mediated hypersensitivity reactions Antigens in the vaccines that the committee is charged with reviewing do not typically elicit an immediate hypersensitivity reaction (e.g., hepatitis B surface antigen, toxoids, gelatin, ovalbumin, casamino acids). However, as will be discussed in subsequent chapters, the above-mentioned antigens do occasionally induce IgE-mediated sensitization in some individuals and subsequent hypersensitivity reactions, including anaphylaxis.”