I am aware of the fact that one may hint to a goy in the correct way on Shabbos to turn off a light in a room. But what if turning off the light will cause a night light to go on, will I be allowed to read from that light? My intention in getting a goy to turn off the main light was obviously for it to be dark in the room, and not for the night light to go on.
Yes, in these circumstances it will be permitted to benefit from the light and read by it.
The reason for this is that the prohibition against benefiting from “maaseh Shabbos” applies only to a direct melachah, and not to something done indirectly (geramah).
Because the night-light was turned on in an indirect manner, it follows that this will not involve a prohibition of “maaseh Shabbos” (see for instance Avnei Nezer 195).