Heroin alters these normal conditions as follows:
Heroin is converted in the body into morphine. Morphine mimics endorphins and binds tightly to the receptors of the GABA neuron. This inhibits the release of GABA.
As the supply of GABA diminishes, the dopamine neuron can release more dopamine. It stimulates the reward centre and you feel pleasure.
In comparison to endorphins, morphine is broken down very slowly. The slow breakdown of morphine allows the pleasure process to continue. The release of dopamine remains excessively high, and the pleasant feelings persist longer.
The naturally occurring endorphins are not addictive because they are immediately broken down after binding to the receptors. They do not stay in contact with the receptors long enough to induce tolerance.