It's just an unsecured informal cash loan, the friend can do what they like with it, they just happen to buy a property. They would only have an interest if that was part of the agreement, which would make the idea doubly terrible.
But the mortage lender will want to know origin of funds, no?
It's just "cash savings". You could tell them 'my mate is gonna shout me £30k' which might raise some eyebrows, but as long as no strings are attached to the loan i.e. it's not secured, they won't GAF.
It's just an unsecured informal cash loan, the friend can do what they like with it, they just happen to buy a property. They would only have an interest if that was part of the agreement, which would make the idea doubly terrible.