A thief tried to bite and spit at police officers attempting to arrest him.
Nigel Wilde had reached in through automatic doors at a shop and stolen two jars of coffee.
Wilde, 34, of Bedford Avenue, North Shore, pleaded guilty to theft.
He was fined £120 with £20 victims’ surcharge but could not pay immediately so Blackpool magistrates said he must remain in the cells until lunchtime instead of paying the financial penalties.
A security guard at B&M Bargains, Whitegate Drive, saw Wilde reach through the shop’s automatic doors and take two jars of coffee, valued at £5.98, which he hid in his jacket, on Saturday.
Steven Townley, defending, said Wilde was upset after he was unable to collect his heroin substitute methadone prescription from a chemist on Friday.
He decided to steal coffee to sell, so he could buy methadone to see him over the weekend.