People go in, receive a clean injection of unadulterated drug from a medical professional, have access to counselors and job recruiters, etc.
Requiring a payment for the dose to make the clinic self-sustaining can still create availability that far undercuts the cartels. Or, through donors, it can be provided for free.
People who are seriously addicted will no longer need to steal to feed their habits. The cartels will lose their best source of income. And very, very few people are going to go to a heroin clinic to use heroin for the first time.
"Hey man, what do you want to do this weekend?"
"Well, I was thinking of going to the clinic and claiming to be a heroin addict. I've always wanted to try that."