Sleep on your side.
Sleeping on your stomach might also work. Avoid sleeping on your back at any rate.
Sometimes if I sleep on my stomach I get circulation problems to various areas of my body that I don't seem to get any other time. This never happens when sleeping on my side however.
Also keep an eye on yourself.
If you notice at any point that you've changed to your back then change to your side. If you've just moved from your side then try the other side for a while. If you wake yourself up with a loud snore take note of your position. You're probably on your back again so move to your side.
Try to take these measures especially if you've been drinking of have a head cold though perhaps these might induce snoring even if you avoid sleeping on your back - I'm not sure about that.
Apologize in advance.
If you know you're a bad snorer and not just an occasional snorer then advise the people sharing the room that they have your permission to kick you, wake you, throw pillows at you, etc should you begin snoring.
There are some factors that will reduce the impact of snoring on other sleepers. In hot places such as the tropics having an air conditioner or one or more fans on through the night can help to mask the sound of snorers.
I also find snoring to be much more annoying in small dormitories with say four people than in large dormitories with ten or twenty people.
In my current trip in Southeast Asia I've been mostly in large dorms and always with aircon or fan on overnight and I either haven't noticed or have heard but not been kept awake by snorers in my room.
It's a two-way street.
Snoring is so common that anybody choosing shared sleeping quarters should always be aware that it's one of the possibilities they should include in their list of "cons". If it's such a huge problem that you know you can't sleep in a room with a snorer, then don't book such a room. If it's a hassle to share with a snorer but you decide it's worth it when taking into account the other benefits such as lower prices, then don't forget to take ear plugs. Opinions vary but I find them wonderfully helpful when used correctly.