Gary Holt, aged 41, was spotted dealing in broad daylight at 11am outside the DIY chain's Shrewsbury store in Featherbed Lane, Harlescott, on May 18, 2021.
Shrewsbury Crown Court heard that police officers saw Holt making an exchange with two men. When the officers approached, the two men Holt was with stayed and complied with police, but Holt tried to run away.
He dashed into a busy main road before falling over and getting arrested.
Holt had in his possession 212 wraps of heroin totalling 4.45g in weight, and 100 wraps of crack cocaine weighing a total of 13.81g. Rob Edwards, prosecuting, said expert analysis found the drugs had a street value of £2,120.
As well as the drugs, Holt also had £248 in cash in his possession and a mobile phone with messages between he and the two other men he was caught with, which was indicative of drug dealing activity. He gave a no comment interview to police.
Holt, of Walton Breck Road, Anfield, Liverpool, pleaded guilty to two counts of possession of a Class A drug with intent to supply.
The court was told by Holt's lawyer that he had been in the grip of a £200 a day cocaine habit, and was dealing drugs to fund his addiction.
Recorder Ben Williams handed Holt a two-year jail sentence, suspended for two years. He also ordered Holt to undertake a three-month drug rehabilitation requirement, 200 hours of unpaid work and 30 rehabilitation activity days.
"You are being given a chance here," he told Holt. "If you mess it up, you will only have yourself to blame. It's on you to make a go of this to try and turn your life around."