Custody of baby!

Can someone advise me please? My friends ex girl friend is pregnant, and she doesnt want the baby, she gives birth on Friday and wants him to take the child, how does he go about this? He signs the certificate stating he is the father then what? Does he go to court to file for full custody or ? ? ? Please help.. he has literally no time to waste