Christopher Sykes was jailed for four years over the bungling effort at the Paddy Power betting shop on Harehills Lane.
Leeds Crown Court heard Sykes went into the premises at 7.45pm on March 7 this year and approached the assistant manager at the counter.
Sykes handed over a note which read: “Please put the cash in the bag.”
Sykes then put a bag on the counter which contained an imitation firearm.
Michael Smith, prosecuting, said the assistant manager refused to hand over any cash, turned his back on Sykes and went to ring the police.
Mr Smith said Sykes tried to claim he was only joking before leaving the premises.
Sykes changed his clothing before going into the Harehills Foods store where he was spotted on CCTV stealing two packets of biscuits.
The shop owner challenged Sykes and there was a struggle as he tried to stop him leaving.
The prosecutor said Sykes took the fake weapon from the waistband of his trousers and pointed it at the owner.
The shop owner believed the weapon was real and Sykes managed to leave the shop.
He was arrested on March 16 and was found in possession of a baton.
Sykes, 37, of Torre Mount, Burmantofts, Leeds, pleaded guilty to two offences of possession of an imitation firearm, attempted robbery, attempted theft and possession of an offensive weapon.
The court heard he has a long criminal record and has served prison sentences for burglary.
Kate Batty, mitigating, said Sykes’s offending was linked to his addiction to drugs.
Miss Batty said Sykes accepted that he would receive a lengthy prison sentence.
Judge Guy Kearl, QC, said: “These were people seeking to serve the public and they must be protected.”