I think Shane is fundamentally weak.
That is the one explanation that fits everything he's done. Not evil, not stupid but weak. I also think he's self-hating. Now that I know he and Rick are childhood buddies, and Shane presumably was "the wild one," that raises the question of why he'd be friends with Rick in particular, and follow him into a career in law enforcement (which seems a natural fit for Rick, but not really for Shane).
I think Shane has latched onto Rick as someone who makes him feel better about himself. Shane was the bad one and Rick was the good one. Rick is more even tempered, and seems a bit smarter and more cultured. Shane trying to take over Rick's family when he thought Rick was dead was simply the next step in that process: becoming Rick. And that need hasn't abated - he was saving Carl because that's what Carl's "dad" would do.
And I don't think Shane would have shot Rick, in retrospect. Shane is an emotional lamprey who needs people like Rick, Lori and Carl in his life to bolster his shaky self-esteem. He has little self-awareness of any of this, and just operates on instinct, which makes him unstable and dangerous.
It's interesting to contrast Shane with Darryl. They're both the good-old-boy/redneck stereotype, but Darryl seems to have come through his deprived childhood with a strong sense of self-worth, maybe because he had no adult supervision at all.
I hope they throw Shane and Darryl together into a situation. Shane would probably despise Darryl as representing everything he hates in himself, and Darryl would be savvy enough to see right through Shane to the quivering weakling at his core.