I can't help you with protein shakes but I would advise to start with eating nothing beforehand unless your blood sugars are low.
For me, exercise can cause my blood sugars to fall and, for this reason, I make sure I have no insulin on board when I start.
Apart from that, I would advise trial and error to see what impact the type of exercise you are doing at the gym has on your blood sugars and, through trial and error work out what works for you.
For example, short weight based training (for me this is climbing) causes my blood sugars to rise so I need an extra insulin dose but cardio (usually a spin class) causes them to fall so I add a small amount of juice to my water bottle.