An eagle-eyed police officer who happened to make a routine stop on Matthew Bonnell one night was later called to the Clifton Arms, Warton, and noted the unusual footprint which appeared to match his shoes.
A bag of stolen items was recovered when police searched his home.
Bonnell, 47, of Post Lane, Warton had pleaded guilty to an offence of burglary and been committed by magistrates for sentencing at Preston Crown Court.
He asked for six other offences of burglary and theft to be considered.
The burglary of the living area of the pub premises on Lytham Road, Warton, was carried out on January 16. It was discovered by the bar manager at the end of his evening shift.
Kath Johnson, prosecuting, said the man’s room had been ransacked. Some cash had gone, as well as commemorative coins from the 2012 Olympics, a £500 camera and two mobile phones.
A number of CDs had been put into a bag and left on a bed.
The CCTV showed a man at the side of the pub at 9.30pm. That man disappeared, only to re-appear half an hour later.
Bonnell was stopped in a routine police check later that night and allowed to continue on his way.
But a police officer noticed that his footwear had a distinctive pattern.
During the burglary investigation it was noticed that the burglar had left a footprint that seemed to match Bonnell’s footwear.
Most of the coins and the cash had not been recovered.
Bonnell had a number of previous burglaries on his record.
Waheed Omran-Baber, defending, said his client accepted full responsibility. He had wanted to clear his conscience.
“From a very young age he has known little else but offending and drugs,” he added.
“At the time of these offences he was in financial difficulties. He owed £15,000 to a car company. The offences were committed to pay for basics, bills and trying to satisfy some of the debt to the car company.
“He accepts it was a stupid thing to do.”
Bonnell was given 18 months prison, suspended for two years, with two years supervision and an ordered to do 200 hours unpaid work.