Window glass takes practice. You have to learn to see the way a camera does. Human vision is excellent at focusing on either what's inside a shop window or on what's being reflected, but not both at once. I learned this the hard way through lots of shots through windows being ruined by reflections on the glass that I hadn't noticed. But eventually I learned to see both as well as to focus on the one that I cared about most. Differences in illumination are also important:
@Glenn_Smith is right that sometimes you have to hang around waiting for the right moment, though over time I've become less patient than I used to be.