Hello and thanks for using Just Answer.
My name is ***** ***** am happy to assist you with your enquiry.
The only way your friend's financial position can be protected is by her registering a private Charge (similar to a Mortgage) against your property. The appropriate document is the Land Registry form CH1. By registerig the Charge, she will then have security that as and when your property is sold, she will be entitled to the amount of money as specified in the CH1.
You both should of course take independent legal advice before proceeding.
I hope this assists and if so, I would be grateful if you could rate my answer.