I've always preferred a fairly simple and straightforward method of shuffling of deck.
For each location in the deck, randomly select another location in the deck and swap the two cards.
Exactly 52 iterations, exactly 52 swaps.
This is actually a very poor way to do it, as the distribution of decks shuffled by this method is quite biased (under the metric of "each possible shuffled deck should be produced with equal probability, or at least computationally indistinguishably so" but almost certainly also under the metric of "how a human would shuffle"). It's a very common mistake, the right algorithm restricts the selection of the other location at each iteration to ensure correctness and isn't actually any slower, see the Fisher-Yates pseudocode. Your algorithm looks correct (I mean, what could possibly go wrong) but it actually isn't...
EDIT: ninja'd by Frob while I was typing this!