Police chanced upon the haul, which included cocaine, ecstasy, LSD and DMT, by "pure coincidence" after attempting to stop Marlea Harrison during random enquiries about a separate incident, Shrewsbury Crown Court heard.
Mr Kevin Jones, prosecuting, said Harrison attempted to run but was caught and found with a spray can and some cocaine on him – prompting the search by police of his home in Bayston Hill, Shrewsbury.
There, the prosecutor said, they found nearly £500 in cash and a mobile phone with scores of messages to indicate Harrison was dealing.
Officers found 16 grams of DMT – with a street value of up to £10,000 – as well as 400 Ecstasy tablets thought to be worth £2,000 and £1,000 worth of cocaine.
Harrison also had nearly 500 capsules of tramadol, a class C drug, and a number of lesser-known drugs.
They included the Class A drug 2CB – known on the streets as 7-Up or Tripstacy – and Class B drug Ritalin, also referred to as "fake cocaine" or "banshee dust".
Harrison, 19, pleaded guilty to four counts of possessing Class A drugs with intent to supply, and two charges of possessing Class B drugs with intent to supply.
He also admitted four counts of possession of a Class A drug, one charge of possessing a Class B drug and one count of possessing a Class C drug.
Mr Richard Franck, for Harrison, said the strain of becoming the main carer for his mother, who suffered a serious accident in 2008, had taken its toll on his client and he had turned to drugs.
"He started taking cannabis, and that led him into contact with people who were unsavoury," Mr Franck told the court.
"As with many others, within six months he was taking more serious Class A drugs.
"He developed a rather expensive drug habit and had a curiosity for sampling more unusual drugs.
"He was offered the chance to get his drugs for free if he worked as a dealer.
"He was naïve and did not know what he was letting himself in for. He made virtually no money for himself."
Recorder Stephen Thomas sentenced Harrison to two years in prison.
Passing sentence, he said: "You were apprehended by police officers by chance – you attempted to run off but were stopped and had cocaine on you.
"That prompted the search of your house, where police uncovered a veritable sweetshop of different drugs.
"I have read about the many positive aspects of your character. But you peddled and sold drugs, and Class A drugs. I am afraid this can only be dealt with by an immediate custodial sentence."