A thief who stole cheese and coffee in a spate of five thefts in a week has been ordered to go to rehab.