I would use 3/16 Tapcon screws. (Use 5/32 masonry bit.) The Tapcon screws are thread hardened specifically for use in masonry materials. The hardened thread will hold up better than a wood or machine screw. A lighter (smaller diameter) screw will likely suffice, but in my experience sometimes heavier weights get placed on shelves.
To level the shelves, I would apply felt adhesive pads, like those used to prevent furniture from marring surfaces, on the bottom of your shelves. They are compliant, and faced with the head of the Tapcon screw, they will deform. That will help keep the shelf from sliding, and moving. If the shelf is not even on the screws, you can multilayer the pads to get things approximately right.
For drilling level, you can use a level, but a laser level, if you have one available, is an easy way to get a level line projected on to the wall. You may also wish to apply painter's tape to the wall and premark your desired holes on the tape. If you can, avoid putting the screws into grout, and stick to the brick area, as it is more rigid, and less likely to crumble over time.
If you mess up with the Tapcon, there are soft plastic inserts. Either re-bore to a larger size, or put the inserts in, and use a smaller hardened screw like the Tapcon.
You are perceptive to know that masonry screws are not precisely located sometimes. If you end up with a screw that is real high, you can use a spade bit or if you have them, a Forstener bit, both nearly flat bottomed, to lightly hog out shelf material to make a better fit for a level shelf. Still use the felt pad(s) to have a compliant resting spot on the screw.
A hammer drill is much better than a regular drill. Should you have a friend who offers you a rotary hammer drill, be nice to them and get the appropriate size bit from him. The rotary hammer is the best tool for boring into these materials, and is not only faster, but will place far less wear and tear on the bit.