On September 2, 2021, Sajid Patel, 25, stopped off to buy cannabis and smoke a joint in a car park.
"This is not something that he does on a regular basis at all," said Judith Hawkins, defending, at Bolton Magistrates' Court.
"He said he was just sitting quietly with his thoughts for a few moments before going home."
However, after setting off, Patel was caught by a police mobile speed camera as he did 40mph in a 30mph limit and officers ordered him to stop.
"The officer could smell cannabis coming from the defendant and therefore required a roadside saliva sample which indicated positive for cannabis," said Adam Bonney, prosecuting.
According to The Bolton News, Patel, who has no previous convictions, pleaded guilty to drug driving.
Ms Hawkins told the court, "I hope you will take it from me that his remorse is genuine and this is a one-off incident that will not be repeated in the future."
She said that on the day he committed the offence Patel had been feeling "quite stressed out because it was his second full day of fully-qualified work".
"He was getting up very early to drive to two sites for his employer," she added.
Magistrates were told that, unusually, he bought a very small amount of cannabis.
"This is not something that he does on a regular basis at all," said Ms Hawkins.
Patel, who is single and lives with his parents and grandmother, then started to drive home.
"He does not seek to make excuses for his behaviour. It was a bright, sunny day - he decided to drive a short distance only from the car park he had tucked himself out of the way in and that is when he came across the police officer.
"He had driven for one to one-and-a-half miles only.
"It was a very stupid thing to have done. He had, at the time, no idea that he was drug driving."
She added that, in addition to the court's punishment, which will mean him having to get up very early each day to catch a train to work, where he earns £5,500 a month, he will be dealt with by his professional regulatory body.
"It seems that this is a dreadful, stupid mistake that this young man has made. He is not going to do it again," said Ms Hawkins.
Patel, of Walnut Street, Astley Bridge, was fined £1,269 plus £211 in costs and charges and was banned from driving for 12 months.
Magistrate Joanne Halliday told Patel, "It was clearly a very foolish thing for you to do."