.Can you hint to the goy to open the fridge door even though the light will come on when opened?
Yes you can even ask the gentile to open the fridge door directly. The reason for this is because you are asking the goy to do an act tat isn’t a melacha, rather an act that will inevitably cause a melacha do get done. This is called psik reisha. The Halacha is that we may ask a goy to do an action for us on Shabbos even though it is a psik reisha to a melacha. You asked him to open the fridge, not to open the light, therefore it is permitted.
Rema 253-5, Shulchan Aruch Horav 253-10, Igros Moshe O:CH 2-68, Be’er Moshe 6-10.