Raccons advice is good. The cross country routes from Shaftsbury are not wonderful - narrow and twisty and likely to be busy with farm traffic - silage making etc - at this time of year.
One possible alternative to the Shaftsbury / Taunton/ brean route is A303 to Podimore, then towards Somerton and to Street and then to the motorway junction near Bridgewater but it's hilly in parts and twisty, plus the traffic round Clarks Village at Street.
Me, I'd stick to A303 to Ilminster then Taunton.
Ray S (located near Wincanton).