I used to travel a lot with my girlfriends and we usually had to share bathrooms. I won't discuss the obvious when sharing a bathroom - which is obviously to be clean, considerate and not hog up the counter space.
What this post is about is how to minimize the embarrassment of going "number 2" while sharing a bathroom with someone. The two main things to mitigate - sound and smell.
For sound - unless you are staying at some fancy place with the latest japanese toto toilets that will play music or sounds of rushed air to insulate any unpleasant sounds, you will likely have to resort to turning on the tv or music in the room or running the faucet or flushing the toilet. The latter two options are a waste of water so I wouldn't recommend doing either unless you are very embarrassed or you are with a new paramour and are still trying to maintain the illusion that you don't have normal bodily functions.
For smell - there is a simple trick. After you are done doing your business, light a match and wave it above the toilet bowl for a little while and
voila! the smell will be gone (or at least replaced by the faint lingering smell of smoke). All of my friends utilize this trick because it's easy and cheap. You can always grab free boxes of matches from bars and restaurants. You just have to remember to pack them with you when you travel in a sealed bag (e.g., makeup or toiletries bag).
There are actually specific products that are targeted for this particular problem (e.g., trap-a-crap spray from poopourri.com) but why spend the extra money when you can just use matches that are basically free?