You can only get the most basic idea of the optics while it's in a store, but you can check it out mechanically pretty well. The mount is actually more important than the optics for most starter scopes. So you can get a pretty good idea of a scope, even in the store.
Put the scope at different angles then see if it says where you put it. What does it take to make it move off-target? If it moves on its own, it may need balancing. Or it may be junk. If it moves when touched lightly, the same is true. If the mount seems like it might be stable, see if you can balance the scope. This will also tell you if the scope is built to be balanced against the effects of eyepieces or accessories of different weights.
Once balanced, it should be possible to get the scope to stay wherever you put it. If there are locking mechanisms that hold it in place, do they cause the telescope to move visibly when you engage them? If so, that's not good.
How does the scope react to being tapped? Does it stay on target? It should. How about light pressure? Stronger pressure? A thump, like an accidental bump with the arm?
Pretend to swap out eyepieces. Does it stay put as you remove and reinsert the eyepiece? You'll be doing this a lot. You find something at low powers, then swap in a higher power eyepiece. If the scope doesn't stay on target, you'll be frustrated whenever you try to increase magnification, since higher power eyepieces see a smaller area of the sky than lower powers. Which makes finding your subject more difficult if you have to do it with the high power eyepiece all over again.
When you adjust focus, does the eyepiece wobble at all or does it travel smoothly along its axis? Once its in a place, can it be jiggled--either in and out or side to side? If so, these are all signs of a poorly made focuser. Are the materials it's made of solid or a bit flexible? They should be rock solid.
Does it hold eyepieces securely, or loosely? You want secure.
If the scope's height is adjustable, can it be moved securely, and does it stay put? Some mounts are only supposed to be adjusted when the scope isn't on them. That's fine. But once it's in place does it stay put? Do any of the stand adjustments present a safety risk to the user? Does the mount allow the telescope to be put on safely? I've known people with high-end name brand telescopes who risk their scope every time they set it up or take it down. Eventually the dice roll against them, and the telescope gets dropped and broken. You may not be in a position to set up or take down the scope in the store, but you can ask. Or have them demonstrate it.
Look for places where you can't be sure of whether something is properly in place or not, or where you're not sure if something is engaged until you let go and see if it starts to fall. You don't want that.
You should be able to use the finder at any angle from horizontal to straight up without undue strain. You should certainly be able to look through it without bumping your head into the telescope. It should be secure as well. and the adjustments to align it with the main telescope should be easy to use. It won't be any use if you can't line it up easily.
Overall, the scope and mount should use solid quality material. It should feel and function like a precision piece of machinery. Tubes made of plastic or heavy paper-type materials are OK, but they should not be at all floppy--they must support themselves and the optical components accurately and firmly. Any sag or wobbliness are trouble.
The scope should be soundly seated on or secured to the mount.
The mount should be stable and firm.
The optics should adjust smoothly, stay put when they're put in place (the eyepiece or focuser shouldn't creep or wobble).
Also, the scope shouldn't have parts that interfere with its proper use for the sake of cosmetic appearance. Like bulgy plastic dew shields or molded plastic part covers.