Thomas Arnold was responsible for importing the stun gun device into the country in November last year, Shrewsbury Crown Court heard.
The court was told that Arnold, of Whitehouse Gardens, Ditherington, has Asperger's syndrome and has an obsession with collecting weapons.
Mr Robert Edwards, prosecuting, said the package containing the weapon was examined when it entered the UK.
He said the importer had been 28-year-old Arnold and the exporter was a firm in the Netherlands.
The court was told that the parcel was put through an X-ray machine and a member of staff thought it looked “suspicious”.
Mr Edwards said the device appeared to be a torch but staff had suspicions that it could be something else.
He said when the item was seized by police it was discovered that, while it looked like a torch, it contained an electric stun system as well.
Arnold admitted a charge of importing a prohibited weapon.
Mr Kevin Jones, representing Arnold, argued that he needed to be carefully managed and a lengthy prison sentence would be “arbitrary and disproportionate”.
The court heard that Arnold had previous convictions for robbery and attempted robbery.
Sentencing Arnold, Judge Jim Tindal told him: “You are a reasonably young man with a very long list, not simply of previous convictions which relate to weapons, but other convictions that involve the use of violence.”
Judge Tindal told Arnold: “The reason you are here is because you are someone with a disability. You are someone whose disability makes him obsessed with weapons."
He said his obsession had led him to order an illegal weapon from abroad.
“There’s no suggestion you were buying it for use as a weapon. You bought it because you are obsessed with weapons and collect them.”
Judge Tindal handed Arnold a three-year prison sentence, adding he would be able to get the help he needed while in jail.