hp pavilion shuts down unexpectedly before I can even sign on

Model? Desktop, laptop? Does it shut down if you pause for a while in the advanced boot menu or go into the BIOS? Safe mode?

Have you installed any windows updates lately or any new drivers?

Try booting into safe mode by using the advanced boot menu. As soon as you power up, begin repeatedly pressing F8 until the menu appears and choose safe mode. See if it still shuts down when booting with minimal drivers.