He said he had sold six at £6 each to his friends, but when he was searched at the police station the Kinder egg, containing 22 tablets, was found.
Richard Davies, mitigating, described Joseph – who was 18 at the time with no previous convictions – as “stupid” and “immature.”
Joseph, 19, of Ashenhurst Avenue, Huddersfield, admitted possession with intent to supply, in November, last year.
Judge David Dixon said no real profit was involved in the “absolutely idiotic” offence, so it couldn’t be classified as street dealing.
On Thursday, at Sheffield Crown Court, he handed Joseph ten months in prison, suspended for 18 months, with 20 rehabilitation days, and £200 towards costs.