For me, the only way to stop a drug addiction or dependency is to take the addict away from toxic mates or environments and have them not take drugs for a long period. Cold Turkey. Short term pain for long term gain.
Put addicts in specially built, safe, basic accommodation which they can't leave and don't allow them contact with the outside world. At first, this would be one padded room with a shower and toilet or something.
After withdrawals have gone, slowly introduce them to life's other pleasures such as going swimming, to the gym, reading and competition. Once they do these things and 'get better' at them, they may realise how good life can be away from drugs. Accomodation could get better as time goes on. Allow them to earn a sort of fake-money within the compound for doing good deeds, giving them the mindset that practise and work = more money and happiness.
They could actually be kept in this place for years, and psychiatric assessments could be conducted before they leave to gauge if they still have cravings.
Giving them Methadone only reinforces the addiction and tempts them to go back to their old ways and mates IMO, same with legalised safe spaces. Legalising would keep needles off the streets, but would be no long term benefit to those struggling with addiction either.