Transfer of shares to friend

I taken money from my friend, instead of paying back him the money, can i transfer the shares held with me.
If so, then How i can transfer shares, held in my demat account to my friend demat account.

http://www.simpleinterest.in/transfer-gift-shares-in-demat-form/

This might help