It doesn't matter whether you are going back or not, you are still entitled to the Statutory Maternity Pay/maternity leave but if you employer offers anything additional to that, it might be conditional on your returning to work so you should check your contract of employment.
I don't think temps & freelancers can get SMP etc because they do not have an employer as such. But they would be entitled to Maternity Allowance. However, if your friend is here on a temporary visa (ie not a Brit or doesn't have ILR) this might affect it as it is a benefit, it would pay for her to contact her local DSS and find out.