This bad boy changes spec to my alternative spec to the one I am in, and it equips the associated gearset with it.
#show [spec:1] Shadow Word: Pain; Prayer of Mending
/equipset [spec:1] Shadow; Holy
/usetalents [spec:1] 2; 1
For clarity: My primary spec (1) is Holy and my secondary (2) is Shadow. The gearset for Holy is called Holy and that for Shadow is obviously called Shadow. If your gearset is called DPS or Healing or something like that then you need to use those names instead. The first line just gives the macro the icon I want it to show. So if I'm in Holy spec, it will show SW:P to show if I click it, it'll go into Shadow spec. Vice versa (Shadow going into Holy spec) it'll display Prayer of Mending. Second line just stops everything if I'm in combat.
If you just want the talent change macro just use the /usetalents [spec:1] 2; 1 line.