I've actually just made something like this myself and found that one of the most annoying things to get right was the delay before the shield was able to charge (I assume you want this if Halo is inspiration).
In my project I have a physical shield that disappears when exhausted so it is slightly different but essentially I have:
A timer that registers time elapsed since last hit:
On contact with an enemy I reset this to zero
It counts up to three and then stops
On the timer hitting 3 I set a bool ShieldCanCharge to True
On being hit by an enemy I set it to false.
For whether to damage health or shields I'd do
if shields > 0 do damage to shields
else
do damage to health
As for the recharge, have a max charge variable, a charge rate variable, you then check the shield bool is set to true and the shield is not already at max strength and charge away.
Apologies if this reply is a bit rambling and useless, I've only just started tinkering myself and know nothing really. I have some shields that work though. I can post capx if interested but I'm at work atm.