I just saw that you said "Instead" of the shift register. If you're trying to do software PWM directly from the pins I recommend this library:
I found it to be the best option for software PWM and made a small modification to the library that allows you to use Arduino pin numbers when defining the PWM channels. This will be way better than using digitalWrite to roll your own software PWM.
But definitely use hardware PWM if you possibly can.