The same backup as you are using for the personal iCloud Photos Library should suffice.
If you are not using the "Optimize Mac Storage" option to save storage, the original photos from your Shared iCloud Photos Library will also be saved in the "originals" folder in package contents of your Photos Library. I checked by searching the package contents of the library for some photos from my Shared iCloud Photos Library. Thy were among the the photos from my personal iCloud Photos Library.
So the Time Machine backup of your Photos Library or a copy of the Photos library will include the photos from your Shared iCloud Photos library as well.
However, the originals are hard to find, because Photos is renaming them in the originals folder. We cannot be sure, if and when all originals have been downloaded. Photos is dragging its feet about downloading and there is no status indicator. I am forcing the download busing all new photos. I am always making a separate backup by exporting all new originals to folders named by the Momemen (the location and the date).