This AHV brochure "OASI survivor's pensions" should answer your question (English):
"Widows’ pensions
1 As a married woman, when will I be entitled to a widow’s pension?
If you are married and your spouse has died, you will be entitled to a widow’s pension if
• At the time when you lose your spouse you have one or more children (of any age). Children of the deceased spouse living in the same house-hold who are entitled to an orphan’s pension as a result of the spouse’s death also count as children. The same applies to foster children pre-viously cared for by your spouse if you subsequently adopt them, or
• If you are 45 or older at the time when you lose your spouse and had been married for at least five years. Your years of marriage will be added together if you have been married several times."
https://www.ahv-iv.ch/p/3.03.e
Your friend will need to complete a form 318.371 called "Survivors pension application form", which is available online in English:
https://form.zas.admin.ch/orbeon/fr/...318_371_v4/new