I've searched far and wide and can't seem to find a parts list for this shifter. I've lost the bolt and need to purchase another. It is the right-hand (rear) shifter, for an 11-speed Shimano XT group.
From Shimano's Technical Documents website comes this exploded view of your right shifter. Typically on these drawings, Shimano will give the size and length of any fasteners highlighted in the drawing (see the "Clamp Bolt" listing--#8--in the linked schematic), however the entire base cover with it's screws is one part number and no information is given about the screws themselves. As has been typical of these kinds of shifters over the years and different models, the bottom cover utilizes two and even 3 different size screws in one unit.
Your missing screw is part of the assembly listed as #3 (of the referenced exploded view) and carries part number, Y06M98030, the R.H. Base Cover Fixing Screw Unit. I googled, "Shimano part number Y06M98030" (without quotes in the search query), and this is the most relevant link that wasn't the same Shimano site I linked above. Still nothing about the size, but you can get a good look at the threads and the shoulder of it. My final answer is that it's an M3 about 5mm long. Because of that shoulder, a matching fastener won't be easy to find in the local hardware store, but I wouldn't be put off trying an M3 socket head cap screw, short as I could get (though a Dremel with a cut wheel could customize a longer one) and seeing if that would be a satisfactory substitute. Or, obviously, the part is for sale.
You’re in luck! Here’s a photo of the underside I grabbed, back when I was selling a M7000 shifter myself.
Can you see fine bolt threads inside the hole? If so, it’s going to be either M2 or M2.5, possibly M3. If the missing bolt obviously screwed into the silver mounting bracket, it definitely isn’t a wood screw.
It appears to be the same screw as the bottom left-most in my photo, so if you remove that one, you could compare. On the XT and XTR shifters, all of the fasteners are coarse threaded (much like a wood screw’s threads). If you discover that it is indeed a coarse threaded fastener, simply find one that screws into the hole with a reasonable amount of force (a screw that isn't too wide or narrow). Also take into consideration the length of the screw: you don't want it bottoming out.
If the missing bolt ends up being a fine threaded machine screw, put some threadlock on it before installation. If it’s a coarse threaded wood screw, don’t use threadlock, it’ll degrade the plastic.