Josef Jakobs (30 June 1898 – 15 August 1941) was a German spy and the last person to be executed at the Tower of London. He was captured shortly after parachuting into the United Kingdom during the Second World War. Convicted of espionage under the Treachery Act 1940, Jakobs was shot by a military firing squad.
bainbrig
you do some research before telling people how silly they are.
Spying has always been classed as Treason. Treason in wartime is classed as a war crime and therefore carried out by the military. In peace time, under the law of the United Kingdom, high treason is the crime of disloyalty to the Crown
Since the Crime and Disorder Act 1998 became law, the maximum sentence for treason in the UK has been life imprisonment.
So the answer to your OP is we only shot spies in wartime for Treason, in peacetime they were hanged. Now Treason is a life sentence.