Article 766 of the French Civil Code
The successor spouse and the heirs may, by agreement, convert the rights of habitation and use into a life annuity or a capital sum. If there is among the successors party to the agreement a minor or a protected adult, the agreement must be authorised by the guardianship judge.