Dear Smile,
1. your friend needs to have all the necessary documents (this differs from Standesamt to Standesamt so he should enquire there which documents they want, they will give him a list), it may be that some must be verified by the German embassy in the Country where he is from.
2. Theoretically he may be required to re-enter Germany again with a visa, but this requirement is normally not made in practice.
3. Given that his application for permission to stay has been rejected he will almost certainly have a hearing about "fake marriage" (Scheinehe) and there may even be further enquiries on this issue.
All in all it is in his case a difficult process and he should seek the help of a lawyer. pls feel free to ask if you have more specific questions on this issue.