A former Royal Marine stole fuel when his life was overtaken by drugs, a court heard.
Mark Coldwell, of Acre Lane in Meltham, admitted the theft on May 29.
His solicitor explained that he started taking heroin after falling in with the wrong crowd.
Andy Wills, prosecuting, told Kirklees magistrates that the offence happened on May 29.
Coldwell filled up his car with £83 worth of diesel at Tesco petrol station on Viaduct Street in the town centre.
He then went to the kiosk to pay but made up a story that he had left his bank card at B&Q.
Coldwell, 35, lied to the staff member that he wold return and left some details.
His car registration number was taken down and the theft was reported to police when he failed to return.
He claimed that he invented the story because it sounded better.
Jonathan Slawinski, mitigating, said that his client served in Kosovo before leaving the Marines and going to work with his dad.
He said: “A year-and-a-half ago he started (hanging around) with the wrong crowd and took heroin.
“Around the time of this offence the drugs issue had got worse and any money he was given was being spent on the obvious.
“He didn’t have money to put diesel in the car and made off without payment.
“It’s an offence out of desperation.”
Magistrates heard that Coldwell has since admitted to two identical thefts from filling stations in Moldgreen and Manchester.
They adjourned his case to assess his suitability for a drug treatment order.
Coldwell will next appear at the Huddersfield court on September 8.