Lets see what smogan says:
Shedinja is at once the most blessed and the most cursed Pokemon to
ever exist, thanks to its access to the best ability in the game,
Wonder Guard. Despite being blessed with immunities to any type that
cannot hit Shedinja super effectively, it is cursed with wielding only
a single hit point, and it is around this hit point that any strategy
regarding Shedinja revolves. For Shedinja to even hit the playing
field, extreme team support is needed, as any form of passive damage
will immediately KO it. Furthermore, Shedinja's stats are
exceptionally mediocre, its meager Attack stat is the only stat that
crosses base 50. Fortunately, it does have Shadow Sneak to alleviate
its speed. That said, Shedinja carries weaknesses to only Dark-,
Ghost-, Rock-, Fire-, and Flying-type attacks, and is thus able to
wall many of the metagame's deadly attackers, including dangerous
threats such as Gorebyss. Additionally, Shedinja carries a nice
immunity to every priority attack bar Shadow Sneak and the predictable
Sucker Punch, which ensures that it can't be picked off at will.
Although Shedinja is devilishly difficult to use successfully, and
nigh impossible to bring in safely, when played to its strengths it
can be an unstoppable force, slicing through helpless opposition.
EVS:252 hp/252 atk/4 spe
~ Swords Dance
~ Shadow Sneak / Sucker Punch
~ Protect / Will-O-Wisp
With great immunities comes...one set you can viably use. Shedinja
makes the most out of the little it has available to it, with Swords
Dance giving Shedinja a way of actually threatening the opponent.
X-Scissor is the requisite STAB option, and hits a large number of
Pokemon for neutral damage. Shadow Sneak is one of the key factors
that make Shedinja viable, the STAB priority being crucial in
outspeeding opposing Pokemon that can hit Shedinja super effectively.
Sucker Punch is also a viable option due to its higher base power, but
it also suffers from failing against any non-damaging attack—quite
costly given that many status moves OHKO Shedinja. Protect is another
crucial move, allowing Shedinja to scout an opponent's moveset for
surprise Toxics that would kill it, as well as random Hidden Powers
from the opponent. Will-O-Wisp is also usable to support the team, but
Shedinja will rarely find an occasion to use it to great effect.