In the Bang! Gold Rush extension, the players who had been killed previously keep on playing as shadow gunslingers. If all players but the sheriff and renegade are killed, the dead outlaws have no aim any more, as if the sheriff stays alive they don't win, but if the renegade stays alive they still lose. What happens then? What should the outlaws do? Who should they shoot?
They still have the same goal to kill the sheriff as on their turn they are back in the game and in the situation you are describing it is temporally a 3 player game again when it is a shadow players turn. Which means that on an outlaws turn if they kill the sheriff then the outlaws win. It doesn't matter that they where a shadow player because during their turn they considered alive and in the game just that they can't gain or lose life.
Here is a section of the gold rush rules which points out that you are in the game at the start of your shadow turn and that you leave the game at the end of your shadow turn.
During each of your following turns (that is, each time it would have been your turn if you were still in the game) you temporarily re-enter the game as a “shadow-gunslinger”— a “shadow-Deputy,” “shadow-Outlaw,” or “shadow-Renegade,” respectively.
As a shadow-gunslinger, you have zero life points. You draw 2 cards, play your turn as normal, and then leave the game again. During your turn, you play as if you were still alive, with all your abilities. But, you cannot gain or lose life points (you ignore the effects of any cards of this type). At the end of your turn, you exit the game again, and must discard all of your cards in hand and in play (including any equipment cards you bought that turn)