I'd shop before you get to the terminal. You never know how busy security will be, what traffic will be in the town, what can happen. My comfort level is highest when I've got everything I need and am firmly planted on the ship - they can't pry me off!
Seriously, I once had a horrific 45 minute, 5 mile cab ride from the hotel to the pier in Fort Lauderdale, due to a tanker truck blowing up on the road. I was still there in plenty of time, but wouldn't want to be cutting it short ever. I did have all my "stuff" purchased, which is what I would advise you to do.
Guess it all depends on your comfort level.