A terminally-ill woman who was told she has six months left to live tried to steal groceries from Asda in Forest Town, a court heard.
Diane Parfitt, 47, of Balby Road, Doncaster, admitted the theft of £449 of meat, spirits and toiletries on January 18.
She removed security tags in the disabled toilets, but was leaving without the goods when she was stopped by police, said Neil Hollett, prosecuting.
Greta Percival, of the probation service, said Parfitt, who was diagnosed with stomach cancer, had been given 18 months to live one year ago.
She was on a number of medications, including liquid morphine for pain.
Mark Stock, mitigating, said Parfitt had been moved on to Universal Credit and at the time of the offence had received no money for three weeks.
She said the theft was a spur-of-the-moment decision.
“She was about to leave the store without going through with the offence,” he said.
She was last before the courts for theft in June 2016, in Lincolnshire, Mansfield magistrates heard on Thursday.
Chair June James-Barrett told Parfitt: “If this was a one-off, we would be inclined to go with your solicitor’s recommendation.
“But it isn’t, is it? You have a record of thefts in various counties.”
She was given a three-month curfew, which will be electronically monitored, from 8pm to 8am. She must also pay £85 costs.