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).
Good explanation. Worth mentioning maybe that if you plan to share DLCs, pre-order bonuses, or extra content outside of the main game, there may be quirks to the process. For instance, the Elite: Dangerous Horizons DLC did not share until the game was patched. Pre order bonuses for Forza Horizon 3 shared properly, while some do not for COD Infinite Warfare. 99% of the time, sharing works flawlessly though. Best Xbox feature ever.– DpeifDec 22, 2016 at 23:42
In all the games I've shared, not one have I had trouble with DLC except for Gears of War in which case my friend did not receive the pre-order bonus characters. He did get the 15 booster packs though.– Timmy Jim ♦Dec 22, 2016 at 23:50
similar issue for COD I.W., friend got pre order bonuses, but does not get recurring special login/chest bonuses for pre order members. Also, in CoD BLOPS 3, my friend could not access DLC-related Gobblegum(!), but had no issues accessing the DLC itself. Cant think of any other examples off the top of my head though, and we have shared about a hundred games so far, so thats pretty good i think.– DpeifDec 22, 2016 at 23:56