A thief who broke into vehicles, stealing wallets and purses, has been jailed for three years after leaving his phone in one of the cars.
Ricky James, 38, carried out the thefts in Basingstoke between 14 July and 3 August.
At Winchester Crown Court he admitted 12 counts of theft, five of fraud and one of theft of a motor vehicle.
Hampshire police said James used stolen bank cards to make contactless payments at nearby shops.
James, of no fixed address, was arrested after he was identified from CCTV and his phone was later found in one of the cars he targeted.
His DNA was also found on an orange hammer he used to break into and steal a VW Polo.
Jailing James, Judge Keith Cutler said that the "whole community of Basingstoke were affected by these crimes".
PC Phillip Chalke said: "James embarked on this crime spree to fund his drug addiction, looking into vehicles and breaking into any which had items on display."