Andrew Squires was in possession of wraps of the drug when he was stopped and searched by police on a car park at Brookside in February this year.
Officers later went to the defendant's home in nearby Teal Close and discovered a number of cannabis plants growing in a bedroom.
At Shrewsbury Crown Court yesterday Squires was given a 12-month sentence, suspended for two years.
Recorder Martin Jackson said he disagreed with the defendant's claim that he was only occasionally supplying friends with cannabis.
"Text messages on the phones recovered by police suggest you were regularly supplying drugs and even soliciting for sales by sending messages about the arrival of a 'new batch' of the drug," he said.
In addition to the suspended sentence Squires will be subject to a rehabilitation programme, regular drug test reviews, be on a monitored curfew for the next four months and must pay £300 costs.
At an earlier hearing Squires had pleaded guilty to charges of possession of cannabis with intent to supply and production of cannabis.
Mr Geoffrey Dann, prosecuting, said officers were on foot patrol on the Brookside estate on February 18 where they saw a group of people standing around a car.
He said Squires was seen walking towards the vehicle and he was stopped and they could smell cannabis and found he had four wraps of cannabis in a tobacco tin and two mobile phones.
Later at the defendant's home officers found nine cannabis plants which had yet to mature but it was estimated they could have produced up to £7,000 worth of the drug.
Mr Dann said there was heating, lights and fans and described it as "a moderately professional" set up.
Analysis of the two phones showed a series of text messages over the previous days from users looking to buy cannabis.
Mr Paul Smith, for Squires, said his client was attempting to conquer his habitual drug use and said the production of the cannabis had been at a 'low level' and was intended for his own use.