Can i use a Tmobile Sim Card on a iPhone5 not activated yet?

Okay guys well i ordered and iPhone 5 from Walmart, so when i get it i will have to call to activate it with Straight talk but i don't want that, my question is If i don't activate it with Straight Talk can i use a Tmobile sim card so it can be on the Tmobile network? Will it work? :| help please

Added (1). Alright so lets say it is unlocked, i putthe Tmobile Sim card in the phone, and it says Tmobile as the sevice on top of the phone, does that seem like it would work?

You'll have to get it unlocked, and I'm not sure whether Straight Talk is GSM or CDMA.