As John says. You usually open a bonnet lying on your back with your head just under the front and your arm inserted up in front of the radiator grille. Usually. I don't agree about which 'window' to break, though. It is a mechanic's job to replace a dropglass, and although it needs a few tools, it is fairly straightforward. A windscreen or backlight nowadays is usually glued in, part of the structure of the car, and it is an auto-glass specialist's job to remove and replace. The insurance company might be suspicious about a windscreen completely broken out. They are designed to keep the occupants inside the car in the event of accident, and it takes something like a felling-axe to make a hole big enough to crawl through.
Buy the glass before you break one, though. Thieves break them, and some are in short supply from wreckers yards.
Don't you have a mechanic service who'll come to your home in situations like this? If you order a new battery from them, they shouldn't charge too much to pop the bonnet. Or a battery service? Or the AA, RAC, or whatever the local motoring organisation is?