Steven Armstrong, of Butterley Hill, Ripley appeared at Nottingham Crown Court after pleading guilty to a charge of fraud.
He admitted selling vehicles owned by Vertu Volkswagen West Bridgford, Nottingham, and kept the value of the sales in which he pocketed a total of £8,000.
He did this to try to cover up a £30,000 debt he had owed to loan sharks.
Armstrong admitted he had personal financial problems due to a gambling addiction.
Judge Robert Brown sentenced Armstrong to eight months in jail, suspended for 12 months, and ordered him to complete 180 hours of community work.
Armstrong has since found new employment working in a molten metal shop.