Darren Sherlock, 47, of Ingleton Drive, Lancaster, pleaded guilty to a racially aggravated public order offence and breaching a restraining order.
The drama unfolded at Urban Spice on Brock Street, Lancaster, after Sherlock left the Horse and Farrier pub one evening in April last year.
“The owner states the defendant entered and shouted a variety of insults and abuse, including calling him a paedophile and racist terms, and he also made threats to another man, Mr Chapman, who is a delivery driver.
“Whilst waiting for his delivery outside Urban Spice he heard the defendant shout insults towards the owner, and says he was called a number of names himself. He was subjected to threats of violence.”
Preston magistrates were told Sherlock, who works at a smokehouse in Lancaster, got a restraining order in 2016 not to communicate with his ex partner or her new partner.
His defence lawyer said: “As far as Mr Sherlock was concerned Mr Chapman worked in a takeaway at the bottom of Lancaster.
“He went to order a pizza and was surprised when he went through the door. He didn’t know Mr Chapman was working there.”
The bench imposed a community order for Sherlock to attend the Thinking Skills programme, and a 42 day electronically monitored curfew.