How can I unlock an iPhone 4 without the original receipt? (UK)
Three UK will provide unlocking for a device on payment of a fee. The requirement of the sales receipt may be their attempt at a fraud/theft prevention mechanism to make sure that stolen phones cannot be unlocked and reused. 

If your friend purchased the device from 3 then he should be able to verify identity with them through payment history, and enable the route to unlocking the device.  

When unlocked you will not receive and unlock code like some devices, instead the identity of the phone is passed to the Apple activation servers so then next time the device connects for activation it receives the unlock command.