You did wrong when you took the money without your friend's knowledge, because it was a trust (amaanah) that was given to you, so it was not permissible for you to transgress against it. By transgressing against the trust you became liable for it, so you have to return the same amount, but you do not have to give anything more than that, unless you took the money and profited from it, in which case the profit must be given to the owner of the money according to the view of some fuqaha' who think that the profit on usurped wealth and that which comes under the same ruling should not be taken by the usurper, rather it belongs to the owner of the money. You may tell the owner of the money what has happened, then agree on the way in which the profits are to be shared out.
See also the answer to question no. 87695.
If you took the money and did not make any profit from it, then you must return the same amount, and there is nothing wrong with giving something extra as a gift.
You have to repent to Allaah for transgressing against this trust. The conditions of repentance include resolving not to do that again, because repentance is not valid if you continue taking your friend's wealth without his knowledge. You also have to tell your friend and ask for his forgiveness, unless you are afraid that telling him will lead to negative consequences, such as his cutting you off, in which case it is sufficient to return the money only.
And Allaah knows best.
Reproduced from Islam QA