It is a familiar story you can hear in almost any court in the UK.
The defendant in the dock has become dependent on crime to support his drug habit. Breaking that link is one of the biggest challenges facing the criminal justice system.
In Scotland, ministers are now looking to North America for a radical solution to the problem: the drug court. As the name suggests, this is a criminal court that deals purely with offenders who have drug problems. They are offered the chance of staying out of prison, but only if they agree to undergo an intensive programme of treatment and rehabilitation.
It usually lasts for at least a year. During that time offenders have to undergo regular drug tests to make sure they remain clean. The court monitors their progress closely, so they know that if they don't stick to the programme, they will go to jail.
Peter Hassett, of the charity Phoenix House, which helps offenders to get off drugs, thinks it is an approach that could work for some offenders.
"I think the great advantage of drug courts is that carrots and sticks do work quite well with drug users. Positive incentives for people to succeed, balanced by sanctions in the court, will keep more people on the straight and narrow," he says.
Hundreds of these courts are now in operation across the United States, and areas where they have been set up have reported a significant fall in drug-related crime. Canada and Australia have similar schemes, and Ireland has just opened its first drug court in Dublin.
A 1998 survey of those arrested in five areas of the UK found:
61% had taken at least one illegal drug
46% were tested positive for cannabis
18% for opiates/heroin and 10% for cocaine/crack.
Nearly half of those arrested across all areas said their drug use was connected with their offending.
32% of the total illegal income of all these arrestees was spent on drugs.
The average illegal income for a heroin/crack user was £10-20,000
Source: Home Office
The need for a new initiative in Scotland is urgent. A recent check on people arrested in Glasgow revealed that 70% had used drugs. The proceeds from a whole range of crimes, from robbery and burglary, to shoplifting and prostitution, are used to buy drugs. Many drug-users who are sent to jail quickly re-offend after their release. Sending someone to prison is no guarantee that they will not be able to get hold of illegal substances.
Peter Allen works with addicts at Phoenix House, in Glasgow, encouraging heroin users to turn away from all drugs, including substitutes like methadone. He argues that treatment in the community is the best option.
"It is definitely the way to go, given that drugs are so prevalent in prison," he says.
"Most people will not remain drug-free in prison. With the restrictions that are placed on them, the boredom factor is there, so they are going to use drugs."
Last year, members of the Scottish Executive went to New York to see drug courts and treatment programmes in action. Now a Scottish version is being planned as part of a £100-million package of measures to tackle drugs.
"It is very clear that there is a close connection between drug misuse and much of the crime in Scotland," says deputy justice minister Iain Gray.
"The beauty of drug courts is that they bring criminal justice and treatment together. If somebody enters the programme they have the opportunity to build a future for themselves and their family, instead of entering a life of crime. We get rid of all the crimes they would have committed to support their habit. So the potential is very great."
Drug courts pioneered in the US
In the US, the decision to set up special courts to deal with drug cases came after the emergence of crack cocaine in the 1980s. The impact on the American criminal justice system was dramatic.
Many more drug-users were arrested, prosecuted and jailed. But there was little treatment. The justice system became a revolving door. Drug-users passed in and out, but got little help in dealing with their addiction.
The courts themselves were overwhelmed by the sheer volume of drug cases. So in 1989 an experiment began in Florida in which non-violent offenders were offered treatment, directly supervised by the courts. This partnership between the criminal justice system and public health agencies was quickly seen as a breakthrough in the war against drugs.
It is an approach that doesn't just help the drug user. The lives of their family and friends can also be transformed. As one drug court judge put it: "You salvage one life, but you help many more."
Drug courts are now well established in the US but until now there has been little interest in Britain. Some politicians may be wary of backing schemes that their opponents can characterise as being lenient on law-breakers.
Scotland: Taking crime out of the system
In Scotland, Iain Gray rejects this argument: "This is not a soft option for drug users. It is a hard option for communities that suffer from sometimes huge rates of drug-related crime… petty crime, housebreaking, breaking into cars, shoplifting.
"Many, if not the majority of those kinds of crime are carried out by people simply to raise funds to support a drug habit. If we can do something about that drug habit, and therefore take that crime out of the system, then that's a good option for Scotland's towns and cities."
So the hope in Scotland is that putting more resources into drug and alcohol rehabilitation will prove a good investment for taxpayers, by reducing the likelihood of offenders returning to the courts.
Exactly how the Scottish system will operate has yet to be finalised. But Iain Gray is clear about the objectives.
"For those who are the victims, in the sense of becoming involved in using drugs, we have to ensure they have access to support and treatment to try to rebuild their lives, and get back into work so they can build a future for themselves. But at the same time, we have to ensure that our enforcement agencies have the capacity to deal with the supply chain which brings so much misery into Scotland," he says.
"So we have to attack the supply and we also have to reduce the market there by helping those who have got involved in drugs. And if we're going to make a difference, and we think we can, it will only be by addressing both sides of that equation."