The button on the Fan Shim grounds GPIO 3 and GPIO 17 when pressed.
If you shut down and leave the Pi powered, pressing the button will have the Pi Boot up again.
Adding the following entry to your config.txt file will have the Pi do a proper shutdown when the button is pressed.
dtoverlay=gpio-shutdown,gpio_pin=17,active_low=1,gpio_pull=up
You can also control the fan on off with another dtoverlay entry.
dtoverlay=gpio-fan,gpiopin=18,temp=55000
Turns it on at 55c and off again at 45c. Edit the 55000 for the on temp you want.
Fan Shim BCM 17 Pin 11 Button
Fan Shim BCM 18 Pin 12 Fan Control
Fan SHIM at Raspberry Pi GPIO Pinout
The fan is going to run when you shut down though.
Fan Shim Button to turn Pi on and off FYI post - Discussion - Pimoroni Buccaneers