Anaphylactic shock develops when the immune system overreacts to an allergen. This involves the release of massive amounts of histamines and other inflammatory mediators from mast cells and basophils, leading to widespread vasodilation, increased vascular permeability, and smooth muscle contraction. These physiological changes result in symptoms like difficulty breathing, swelling, and a drop in blood pressure, which can lead to shock.