An exhaust fan in the shower is a poor design in my opinion and must be installed per 110 3 b.
Gfci protected exhaust fan.
Listed or labeled equipment shall be installed and used in accordance with any instructions included in the listing or labeling.
The nec requires that all outlet receptacles in a bathroom be gfci protected.
110 3 examination identification installation and use of equipment.
B installation and use.
Some exhaust fans require the gfci protection.
A recessed light in a shower is not required to have gfci protection.
The national electrical code nec does not require bathroom exhaust fans to be gfci protected however there is this bit in article 110.
To provide gfci protection for an exhaust fan the incoming circuit power connects to the line side of the gfci outlet then the wires for the exhaust fan connect to the load side of the gfci outlet.
The switches for the exhaust fan and light are installed on the load side wiring as well.
Gfci receptacles are required in bathrooms garages crawl spaces basements laundry rooms and areas where a water source is present.
Bathroom exhaust exterior vent opening should be screened with a to mesh to prevent birds from building nests inside the vent pipe.
Gfci protection is required for 125 volt to 250 volt receptacles supplied by single phase branch circuits rated 150 volts or less to the ground.