There are two types of rogues. Trap finders and sneak attackers.
To build a trap finder, all you need is one level of rogue and then pile on everything else you want. Spell caster levels or fighter levels or barbarian levels or whatever. The only pre-requisites are (1) high int and (2) maxed out search and disable device. No other skills matter -- you can bash open locks with a crowbar at low levels and an adamantite mace at higher levels. Being a human helps a lot because you need every skill point you can get.
To build a sneak attacker, you need (1) lots of SA damage and (2) as many attacks per round as possible and (3) a way to deny your enemies their dex bonus.
1 is a function of taking levels in rogue, blackguard, arcane trickster, guild hall thief, assassin, etc.
2 is optimized by using Two Weapon Fighting (nice synergy with two levels of ranger there) or maybe Rapid Shot.
3 can be accomplished by:
-Invisibility: Not bad. Only a level 2 spell. Use Silence from a cleric for better results.
-Sneaking: Eh. Requires you to spend precious skill points on Hide and Move Silently. Can be easily defeated in many cases by darkvision, a decent spot check, etc.
-Feinting: Worthless, requires waste of feats and skill points, and you can't full attack
-Flanking: Optimal choice. Take a level of barbarian (or monk levels) for fast movement. Works nicely with Spring Attack. Also consider a Grey Bag of Tricks (900 GP) for free flanking buddies.
So, after looking at all the options, humans really come out on top. Why? For trapfinders, they get extra skill points (essential). They also have access to Adaptive Learning from the HUman Paragon class which makes it much easier to keep Disable Device maxed out through your career. For Sneak Attackers, the extra feat is often essential. You don't get many feats as a rogue, so making each one count is awesome. Also, the best way to get sneak attacks is by flanking. Being a dwarf, halfling, gnome, etc really limits the viability of this tactic.