You have it right.

I don't know what sort of terrain you're cycling on, but generally you want to shift both the front and the back.

The front is for major changes- if you think about it you're jumping from 30 to 39 or 39 to 52 (assuming you have a standard triple)- this is going to make a big difference. If you ride in rolling terrain you'll need to be able to shift the front regularly.

The back is for fine-tuning. If you have a 12-25 (one standard road bike cassette) you generally won't be moving by more than 2 teeth at a time. This will make it easier or harder, but you'll have to move a lot of gears to make a big difference.

If you look at the way the bike is set up, you'll notice that the front and back are aligned so the easy gears are on the same side (inside- close to the bike) and the hard gears are on the same side (outside- farther from the bike). In general, you don't want the chain to have to cross-over too much (refered to as cross-chaining). So if you're going up a steep hill you should be in the small ring in the front and one of the bigger rings in the back. If you're on a gradual downhill you want to be in the bigger ring in the front and one of the smaller rings in the back. If you're somewhere in between you'll want to be in the middle ring in front and one of the middle gears in the back.

Good luck!