Corrie Allen, 23, walked into the store with three men and a woman and started helping himself to spirits from behind the counter.
He had a brief word with cashier Jack Mills before filching two packets of cigarettes, a bottle of cola and cans of Red Bull from a fridge without challenge.
“Mr Mills could see he was struggling and handed him a carrier bag to help him,” said prosecutor Carl Fitch.
“Allen’s friends just looked on seemingly aghast at what he was doing and they went on to purchase items legitimately from the store.”
The late-night raid at the Earl Francis Convenience Store on Manor Oaks Road, Sheffield, was captured on CCTV cameras.
Unemployed Allen was arrested by police on April 26.
Mr Fitch said Allen told officers his friend was owed a debt by Mr Mills and he had been asked to shoplift some spirits to help pay off the debt.
“The conversation he had with Mr Mills was him explaining that he was taking the cigarettes and spirits on behalf of his friend.”
Amanda Denton, for Allen, said the film showed exactly what happened. “The circumstances are rather unusual,” she said.
The judge Recorder Kate Tulk said: “It’s a bit weird. It is not really theft from a shop in the traditional sense.”
Allen, of Windy House Lane, Manor, admitted theft of three bottles of spirits and the cans and cigarettes.
He has 12 previous convictions for 24 offences including handling stolen goods in July, 2009.
He also has a 12-week suspended jail sentence hanging over him until May next year for growing cannabis.
Recorder Tulk told Allen he had a “sorry history” but “I’m going to trust you on this occasion to comply with a community order”.
Allen was given a 12-month order with 200 hours of unpaid work and he was ordered to pay £72.50 compensation to the shop owner as well as £85 prosecution costs.
The order will run alongside the suspended sentence imposed by Sheffield magistrates on May 2.