Installing base cabinets - Securing to floor/shimming?
Shims are ordinarily left to just friction for anchoring. In your case, even if you only glue them to the subfloor they're unlikely to move. You could certainly also glue them to the cabinet base. 

I wouldn't bother trying to screw them in, though. That's overkill alongside construction adhesive and will probably result in a bunch of split wood and swearing. You might pop a few trim nails into them if your have an air gun on hand, just to secure them while the adhesive sets.