As [] is the default conditional (aka it tells the game to cast it as if you clicked it from the spellbook) it will always evaluate to true and stop the macro. So, if you use it, it should be the very last conditional.
So, for your specific macro, you’d want to replace the first [] with [harm]. Also, help and harm imply exists, so you don’t need exists when you use them. I also find it’s useful to include “nodead” with mouseovers so you don’t get unexpected results if your mouse happens to be over a dead player’s corpse in the world.
/cast [mod:shift]Inner Focus; [@mouseover,harm,nodead] [harm] Shadow Word: Pain; [@mouseover,help,nodead] [] Renew
Keep in mind that the above macro will prioritize a hostile target over a friendly mouseover. If you want to prioritize the friendly mouseover use this:
/cast [mod:shift]Inner Focus;[@mouseover,help,nodead]Renew;[@mouseover,harm,nodead][harm]Shadow Word: Pain;Renew
Finally, if you want the macro to cast both Inner focus (when shift is held) and either SWP or Renew with one keypress, you can do this as Inner Focus isn’t on the GCD:
/cast [mod:shift]Inner Focus
/cast [@mouseover,help,nodead]Renew;[@mouseover,harm,nodead][harm]Shadow Word: Pain;Renew
The second line will go off with or without shift held, but Inner focus will only be cast with it held.