Robber Daniel De Costa, who held up an off-licence worker at knifepoint, was jailed for three years on his 24th birthday.

The drug addict claimed he had carried out the offence to get attention because he was not getting adequate treatment for his attention deficit hyperactivity disorder.

But a judge heard that De Costa, who has a string of previous convictions, had previously been jailed for robbing a shop with a knife.

Kate Brown, prosecuting, told Swindon Crown Court that Julie Grey was working alone in Unwins in Stallard Street, Trowbridge, when De Costa entered the shop at 8.30pm on August 9.

She said he approached the counter and asked for a packet of cigarette papers, but when the till opened he produced a knife and mumbled something.

He took the money she put out for him and told her to lie on the floor and count slowly to 60, which she did as he made off.

It was discovered that he had taken in the region of £300 from the shop. He was later arrested in Bath after the video footage from the store's security camera was viewed.

When he was interviewed he told police he smoked crack cocaine and had taken heroin on the morning and gone to Trowbridge to commit the offence to get money.

He said he had got £240 and used all of it, apart from the cost of a taxi to Bath, on crack cocaine and heroin. He said he had used a three- and-a-half-inch kitchen knife which he had thrown away.

She said De Costa, of Ballance Street, Bath, also admitted a burglary during which he stole £176 worth of spirits from Asda in Trowbridge, knowing he was banned from the store. When he admitted that at the magistrates' court they deferred passing sentence, but sent it to the crown court when he was charged with robbery.

Miss Brown said De Costa had committed another robbery with a knife in 1998 and had been convicted of burglary in 1995, twice in 1996 and in 1997.

He was jailed for 30 months for the previous robbery, committed in Bradford on Avon, and was on licence at the time of the latest offences.

Mark Worsley, defending, said his client "indicated the reason for the offence was to draw attention to himself to get treatment for his drug problems".

He said De Costa needed drug rehabilitation and treatment for his disorder.

Sentencing him, Judge John McNaught said: "It is a very sad, depressing case. You get a chance from the magistrates' court with a different sentence and you commit an offence you have committed before, a robbery at knifepoint.

"I have to treat that seriously. Shopkeepers with small shops are vulnerable and need protecting."