The most recent government shutdown took place in January 2018. And for all the finger pointing, debate, and blame dished out around political circles, most people just wanted to know, “who still gets paid?”
In short the President, Congress, Supreme Court Justices and all other appointed justices continue to get paid during government shutdowns. Meanwhile the list of people furloughed hovers around 800,000 federal workers (excluding military members), as evidenced by the October 2013 government shutdown, until a federal budget is passed.
In the Executive Branch, workers deemed “excepted employees” are still expected to go to work and perform their jobs, even though they aren’t getting paid. The names on this list largely include people appointed by the President himself. Employees deemed critical to the Judicial Branch are also expected to go to work to ensure the Rule of Law continues functioning.
Government employees who are furloughed during a government shutdown have historically been paid retroactively, but payday will probably not be as quick as most would like.
Why do politicians and judges get paid during a government shutdown?, Constitution Daily, National Constitution Center