The facility has been approved after years of debate over its legality, in a move experts hope will help Scotland reduce drug deaths.