The biologists Balderrama et al. conducted an experiment in which bees were exposed to an "electrical stimuli" (i.e., shocked) and their stinging response was noted. Then different bees were given various injections (including morphine and naloxone) and shocked some more. They concluded that bees have a pain killing system, which can be enhanced with morphine or blocked by naloxone. In their own words:
Morphine (50 to 200 n-moles/bee) produces a dose-dependent inhibition of the honeybee response to the electrical stimulus and this effect is antagonized by naloxone. These findings indicate the occurrence of opiate receptors in the honeybee and suggest the existence of endogenous opiates (i.e., an endorphinic system for pain perception modulation). However, two facts have to be taken into account. First, even though the doses of naloxone that antagonize morphine are similar for bees and vertebrates, the D50 [50% inhibition of the stinging response] of morphine for honeybees (927 ug/g) was found to be far greater than that reported for behavioral tests in vertebrates (0.30 - 10.0 ug/g), and 3 to 10 times higher than that reported in other arthropods. Second, bees injected with enkephalins and related peptides at a dose of 200 n-moles/bee did not exhibit the effect of the same does of morphine. The results obtained by the morphine experiments suggest that an endorphinic system is responsible for pain modulation in bees (Balderrama 127).
Another study provides even more compelling evidence that bees feel pain. Isopentyl acetate (IPA) is a major component of the sting alarm pheromone, which is emitted by guard bees to alert the rest of the hive to danger and to stimulate them to sting the attacker. It was shown by Núñez et al. that exposure to IPA causes a bee's endogenous opioid system to produce stress-induced analgesia (read: IPA releases natural pain killers). This is so that the defender bees will continue to attack even if they are injured (Núñez et al. 78).
In this study, bees were subjected to a "nociceptive stimulus" (electric shock) to produce a stinging response. They discovered that it took higher voltage to produce a stinging response in bees who had been exposed to IPA (and consequently had their natural pain killers activated) compared to unexposed bees. The response also increased with the quantity of IPA to which the bees were exposed. Furthermore, if the bees were exposed to IPA and naloxone, which blocks the opioid system, the effect of the IPA was completely cancelled out and the bees continued to sting even at the lower voltages. In the words of the scientists, IPA "chang[es] the threshold of responsiveness to a noxious stimulus" (Núñez et al. 79).
Even more interestingly, the Núñez et al. study explains the results of the Balderrama et al. study, which attempted to see if Africanized honeybees were more aggressive than European honeybees. Actually, they discovered that Africanized honeybees respond with fewer stings than European honeybees did to the same stimulus. However, this is not because the Africanized honeybees are less aggressive, but rather because they have a more effective, or more easily stimulated, pain response system. That is, Africanized honeybees are much less likely to stop a defensive attack due to pain.
All of this can be summed up by saying that if you shock a bee, she will sting you. A shocking conclusion indeed.