Shoplifter Michelle Davis was told she was being given a last chance to avoid being returned to jail after she admitted loading up a trolley and walking straight out of a supermarket.
Davis was caught with a trolley full of meat and groceries just four days after police had freed her on bail for a similar incident.
Swindon magistrates decided to impose an 18-month conditional discharge with a condition to attend the Think First programme after her solicitor Andrew Hobson told them prison was not working for her.
Stacey Turner, prose-cuting, said security staff saw her wandering around Asda with a full basket before heading towards the kiosk at the front of the store.
But instead of stopping to buy some cigarettes or pay for her goods as expected, she went straight through the door. She was followed and as soon as she became aware of being watched she dropped the basket.
In the second incident she filled a trolley with fresh meat and when she was caught, told police she planned to sell it and buy heroin.
Mrs Turner said: "She has a number of previous offences which might make her easily termed as a persistent offender."
Davis, of Kirkton Hill Road, Westlea, admitted two charges of shoplifting with a value totalling £179.
Mr Hobson said that although his client was not suitable for a drug treatment and testing order and had psychological problems, a rehabilitation order was a realistic alternative to returning her to prison.
He said her offences were the kind usually committed by people in the grip of drug addictions and were unsophisticated.
Davis, 20, had experienced prison before and during one spell in custody had tried to take her own life, but since being released on bail two weeks before she had not been in any sort of trouble and was completely drug free.
"Prison is not working for this young woman. It is not getting at the heart of the problem which is one of long term drug addiction."
He psychological problems could also be the cause of her addiction in the first place, he added.
Tina Clarke
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules hereComments are closed on this article