Disable the Music, Book and App store functionality within iTunes. After applying this command the options will disappear in the navigation bar (Store section) and all other menu options within iTunes v7.1 and above.
defaults write com.apple.itunes disableMusicStore -bool YES
To make the command take effect, you need to restart iTunes.
Re-enable the home sharing option with the following command:
defaults write com.apple.itunes disableMusicStore -bool NO