Upvote:3
While returning, can I enter Germany through airport, stay at my friend's place and then return to my home country?
Yes.
If so, do the Germany immigration officer need my hotel booking in Germany or not?
No. You won't see a German immigration officer when you enter Germany, because you will be arriving from France on an "internal" Schengen flight. Instead, you will (possibly) be asked the details of your trip when you first enter the Schengen area on your way to France. At that point, you may be asked to show proof of accommodation. For the nights you are planning to spend at your friend's place, you should not show a hotel reservation, because you do not plan to stay in a hotel. Instead, you shoukd show a letter from your friend attesting to your arrangements.