A man caught stealing from his new employer was made subject to an 18 month community order when he appeared before High Peak magistrates for sentencing on Monday.
Mohamed Mounir Almi, 30, had admitting taking brass stampings worth about £300 from Flowflex in Buxton.
He must now comply with 18-month supervision and a six-month drug rehabilitation requirement.
The court had been told that Almi, who had an ongoing problem with heroin, had stolen to pay for a drug debt.
He had obtained employment through an agency and during his third day at work, on February 16, had been caught stealing the items.
Almi, who had separated from his wife and family, would as a result of the proceedings find it difficult to find employment in the future, said his solicitor.
Magistrates were told that he was hoping to go on a course to learn new skills in a bid to help turn his life around.
Almi, of Mettesford, Matlock, was also ordered to pay £85 court costs.