Your first step once you're in a Starbucks is to turn on Iphone wifi which can be done by clicking on the "Settings" icon,:
Now click on "Wi-Fi" and after a second or two you'll see:
Choose the StarBucks or “attwifi” and go back to the main menu.
But you're not done.
Now go to "Safari" and, using a bookmark, refreshing the page you're looking at currently or typing in a new URL directly, go to somewhere on the Web.
The wifi network will intercept your request and drop you on the page that requests your iphone number:
Enter your phone number (though why it can't auto-detect it I'm not sure) and agree to the terms of service by checking the box, then click on "Click Here to Continue"...
Tick, tick, tick. A few seconds pass (it took about five seconds for me) and you'll be notified that you have a new text message
Click on "View"...
All that's left is for you to click on the actual blue URL shown in this text message and, congrats, you're now online.