Shadowheart isnt working towards Shar's goals at the start of the game, shes just trying to survive, same as anyone else.
If you are too evil it even messes up your romance with her.
She is actively working for Shar when we meet her. That's what the puzzle box is all about. She was sent to steal it, but got captured by Mind Flayers mid-mission. Her attempts to survive with us are her attempts to complete that mission. She tells you as much.
She doesn't seem to have the stomach for mega evil, which we learn from taking her along the Grove Killing path. That is good. It means she herself isn't totally irredeemable.
But she is still serving an evil god actively and intentionally.