Opiates come in specifically from a plant. A poppy. Which mimic opioid like chemicals in our body, but they are created outside the body. They simply modulate the conversation between the nociceptive neurons. And that's why you get those effects like euphoria, but also have an effect of dopamine and so forth.