Shelton was commissioned into the army as an ensign in the 9th (East Norfolk) Regiment of Foot on 21 November 1805. Two years later he became a lieutenant. In 1808 he saw action at the battles of Roliça, Vimiero and Corunna in Portugal. The regiment was subsequently recalled to Britain. Shelton took part in the disastrous Walcheren expedition of 1809 before returning to the Iberian Peninsula in 1812–13. During those years he participated in the battles of Badajoz, Burgos, Salamanca and Vittoria before being severely wounded at the siege of San Sebastián, losing his right arm. It was said that he stood unmoved outside his tent while a surgeon amputated the limb.