Two thieves jailed for shoplifting will have to pay compensation to the shops they raided when they are released from prison.