A stash of amphetamine was found when police carried out a raid on a flat in Boston town centre, Lincoln Crown Court was told.
Officers went to the flat above a shop in West Street and discovered the drugs in the kitchen.
Philip Plant, prosecuting, said that a plastic bag containing 357gs of amphetamine was found after the flat occupier Stephen Towell pointed it out to officers.
Towell was later interviewed and denied he had any involvement in the sale of drugs.
But in court Towell, 51, of West Street, Boston, admitted a charge of possession of amphetamine with intent to supply on October 21, 2015.
He was given a six month jail sentence suspended for two years with 100 hours of unpaid work.
£200 cash found on him when he was arrested was ordered to be confiscated.
Neil Sands, in mitigation, said that since Towell’s arrest nearly two years ago he has given up using amphetamine.
The court was told that Towell is unemployed and on state benefits but does voluntary work for a local charity one day a week.
Mr Sands said: “He is clear of all illegal substances. He is a man who had used amphetamine on and off for 25 years before this.
“He has made an effort to show that he is not going to be in this position again.”
He said that Towell had supplied drugs to friends on a non-commercial basis and was not selling to make a profit.
Judge Simon Hirst, passing sentence, said: “Given the basis of your plea that has been accepted by the Crown and the fact that you are now off amphetamine and you are doing voluntary work it seems to me that it is not necessary to send you to prison immediately.”