Ashley Thomson picked up two cases of lager and a couple of bottles of Cherry Lambrini wine and made to leave the Murco Service Station in Gainsborough, as his accomplice Dean Smith distracted counter staff.
Robert Underwood, prosecuting at Lincoln Crown Court, said that a member of staff armed with a hammer approached the men.
An automatic locking system was also activated by staff to secure the doors and prevent the pair from leaving the shop.
But Smith manage to force the doors open and the pair made off from the scene with the alcohol.
Both were arrested the following day but made no comment when they were questioned by police in interview.
The pair were originally charged with carrying out a knife-point robbery, but the prosecution accepted their pleas to theft after CCTV footage revealed no evidence of a knife being used in the incident.
Stuart Lody, defending Thomson, said he had always been prepared to plead guilty to theft and urged he be given a sentence which allowed him to be immediately released from custody.
Mark Watson, defending Smith, said he had already been punished as he had served the equivalent of an 11 month jail sentence while being held on remand.
Thomson, 22, of Rolleston Close, Lincoln and Smith, 26, of Portland Terrace, Gainsborough each admitted theft on 1st March.
They were each jailed for nine months, but will be released immediately because of the length of time they have already spent in custody on remand.
Judge Sean Morris also imposed a five year ASBO which bans them from entering the shop or the adjoining filling station forecourt and from approaching any members of staff.
He warned the pair that they face a receiving a two year jail sentence if they breach the ASBO.
Judge Morris added: “The pair of you are a nuisance.”
“You have only yourselves to blame for where you ended up. I have no sympathy for you.”