Praise be to Allah.
If the company gives money to the employee to buy something that he uses at work, he does not have the right to buy that thing and keep it at home, and use something else instead of it, because this is not purely a gift; rather it is a gift with conditions attached, so it should be used in accordance with the stipulated conditions.
It says in Asna’l-Mataalib by Shaykh Zakariyya al-Ansaari (may Allah have mercy on him) (2/479):
If he gives him some money and says: Buy yourself a turban with it, or go to the public bath with it, and the like, then it must be spent for that purpose, because that is the reason why the giver gave it to him, whether the purpose is to cover his head with the turban or clean himself by going to the public bath, because the one who gave him the money saw him bareheaded or looking unkempt and dirty. But if that was not the giver’s intention, and he only said what said by way of jest, then he does not have to spend it on those purposes; rather that money becomes his property and he may dispose of it however he wishes. End quote.
Shaykh Sulaymaan ibn ‘Umar al-Jamal (may Allah have mercy on him) said: If he gives him some dates with which to break his fast, then he must do that, according to the apparent meaning of what he said. So it is not permissible for him to use that for any other purpose, because of the intention of the giver.
End quote from Haashiyat al-Jamal ‘ala Sharh al-Manhaj (2/328).
Shaykh Ibn ‘Uthaymeen (ma him) said: The basic principle concerning that matter according to our view is that whoever receives money from people for a specific purpose should not spend it on anything else, except after seeking their permission.
End quote from al-Liqaa’ ash-Shahri (4/9):
Based on that, what you did was wrong. You should use the new shoes at work, unless the company gives you permission to use something else.
If the company gives money for buying new shoes to those who took money before, there is nothing wrong with the one who meets the stipulated conditions taking that money, such as if they stipulate that the first pair of shoes should have worn out, or they stipulate that there should actually be a need for new shoes.
If they did not stipulate any condition – rather they looked at the passage of time after which it is expected that the first pair of shoes would no longer be fit for purpose, then there is nothing wrong with you taking the money and buying new shoes, even if your first pair of shoes are still in good condition, after correcting the mistake that you made in the beginning, and starting to use the first pair of shoes for work.
That is because all that is required of you is to repent and use the shoes at work. If they remain in good condition, there is nothing wrong with you taking money again to buy new shoes, so long as it is not stipulated that the first pair should have worn out.
And Allah knows best.