If I log into my friends account on my Xbox and set it to "My home Xbox", I understand I will get his games and his gold membership. But will he get my games as well as everything else I buy, such as DLC?
As long as you set up the home console correctly, your friend should get the games also. This is how me and my friends share our games. The best part is, you can play the same games at the same time!
In order to share the games, the person who's Xbox is not the Home Console must purchase them. Once purchased, it should also show up on the home console as well in the "Ready to Install" list. To split the cost, usually my friend will get me and Xbox gift card code to redeem, but that's obviously optional.
For example, when me and my friend set this up, my friend had to sign in under my account on his Xbox in New Mexico. He set the console as the home console while under my name, signed out, and was done. From there on, he plays under his own profile, and I use mine on my Xbox in Virginia. I have to purchase everything for us, which allows us to both to get the product.
Here is another guide that explains the setup process in terms of "who needs to be signed in where" to designate as the home console (something the Microsoft page doesn't explain well).