My cat had the same problem but I ridded her of the habit within a few weeks with a simple trick. I got shelves like those above me mentioned but had a twist to it. Cats are mischievous in nature, it's what gives them that old saying "curiosity killed the cat." They'll do anything and everything they're not supposed to unless given a reason not to.
Call my methods inhumane if you wish, but it taught my cat to never get on shelves not meant for her and she loved me unconditionally and vise versa afterwards.
I got shelves designed for her by getting cheep wood from home depot (Ask a manager if they have wood scraps about an hour before closing and most times they'll be willing to give it to you if you say you have an art project). Get paint of your desired color, paint them, and then buy cheap but sturdy hinges. If it wobbles a cat will likely be unwilling to make it a permanent perch. Put NEW toys on it, typically the bigger the better. Cats tend to like to knock stuff down to feel like they're in control of the house and not their masters. In their mind, you are their pet, not the other way around. If you put old toys up they will be uninterested, know your old attempts, and view this as a trick. I sprinkled catnip on the shelves just to make my cat have some added incentive to get on it but that's your own prerogative.
Here's where some might call me inhumane. You can get a bottle of "Pet Away" formula, it might be called something else but some types keep dogs from chewing, cats from peeing, etc... Any of the above will work but I personally chose the "no chew" stuff. Pour that in a spray bottle 1/4 cup to every cup on water and then spray this mixture at the cat when it is on an undesired shelf. To fight a cat you have to be sneaky like a cat. If the cat looks like it's going to jump on a shelf, act as if you're leaving the room but keep a hidden eye on it. This will trick the cat into thinking it will be punished even when you're not watching. When the cat is on a shelf you desire him/her to be on, calmly and slowly approach WITHOUT the bottle in hand, and offer it a treat as a reward. If he flinches to run away, don't chase him with a treat, simply place the treat on the shelf, and walk away.
It'll be an annoying process but after a few days you should see him start to understand the difference between "for cat" and "not for cat" areas. It will take longer, however, to completely break him of the habit.
NOTE: Be sure to say "No" or "Get Down" BEFORE you spray him. This will teach him that these commands will lead to a spray if he does not obey and after a while just the sound of the command will get him down. Without these commands the cat will not understand why he's being sprayed and will be afraid of whoever is doing the spraying irrationally.
Best of luck my love.