It’s been a little while since I regularly did shrimps, but generally I’d say pistols are more quad dominant and shrimps are more hamstring dominant.
I’ll put it this way, when doing stand to stand bridges, the leg/lower posterior chain involvement feels more like a shrimp squat.
Personally I find pistols to be a better overall exercise, but this also depends on if you’re getting adequate work for the hamstrings from other exercises. But yes, they do hit the same muscle groups in general. The ratios of force per muscle group is a bit different but the difficulty of each will mostly depend on individual biomechanics and familiarity/comfort with each exercise.