Ganking junglers (especially like Shaco) have a particular risk when you select them: If you don't gank successfully, it's difficult to be effective for your team. Being too low level in mid-game is one of the symptoms of that. Being under-geared is another. On the other hand, farming junglers can give you tunnel-vision inside the jungle and keep you from ganking lanes.
So, to answer your question, it depends on the jungler a little bit. Shaco you definitely want to be ganking whenever possible (your team, by the way, needs to make this possible). With Skarner, ganking is good, but before level 6 you're often better off farming unless someone has over-extended. Shyvana you'll be spending a fair amount of time in your enemy's jungle, which takes away from ganking time.
Generally, here are the order of operations you should be following:
- If there's a gank where you think you can kill someone, do it. You'll get kill or assist gold, and that lane will get time to farm. You need to think of your whole team's gold, not just your own.
- Is a lane in trouble because of an aggressive opponent? Gank that lane... but do not overpursue! Your goal is to teach that opponent that they can't do whatever they want, and if they keep it up, they're going to die. If they learn, then that lane can farm more safely. If they don't learn, then go back to 1.
- Is a lane in trouble because they are too low to farm, but can't leave without serious tower-damage? Hold that lane. You'll get more farm and XP (especially if you can last-hit under a tower) than in the jungle, the lane gets to go back, and maybe you can harass the opponent.
- Everyone has pushed their lanes, tower-diving is likely to cause unnecessary deaths, and everything else is golden? Farm your jungle OR the enemy's jungle, if you know where the jungler is.
The only remaining question is what to do about buff's. In general, you want to get/give your buffs if A) nothing is going on, B) you're being counter-jungled and you know you'll lose it, or C) getting that buff will help you get a kill in lane (red on Shaco/Lee Sin/etc.). Buffs are very important, so make sure you fit them in with the above.
In short, the biggest thing you can do is always being doing things. Junglers are in a unique position of improving the team's overall gold by helping lanes win.
Jungling is a complex role, so I'm sure there will be comments with more/different advice.