I don't think this is viable for you. To work for shares instead of cash, you have to be sure you'd get some value for them (even disregarding the risk of the company crashing and burning). Hence you'd need some form of shareholder's agreement, which itself would generate legal costs. Without that, your shares are effectively worthless (unless you're being given an equal shareholding, which seems unlikely), as other shareholders, including, for example, a new investor, can dilute you to nothing amongst other things.
If they don't have the cash, treat it as a loan. Either that or barter something. You're left with the same sort of question: would I loan the person X amount.
It would be common enough to have some form of very soft loan with personal friends or family when starting up (i.e. "pay me when you can"), though this is dangerous too if the amount is large, but I note you say "family friend", which isn't quite the same thing.
So, I'd recommend:
- anything that could be bartered?
- treat it as a loan: have some form of written agreement, so there's no misunderstanding
It's up to you to decide how "soft" or "hard" the loan terms are, or if you want to do it at all.
This is far less complicated than getting involved in shareholdings (I think people read too much into stories about the early days of Facebook etc.).