The Kolmogorov-Smirnov test is a test of any completely specified continuous distribution against general alternatives.
The Shapiro-Wilk is a test of normality without specifying the mean or variance.
That is, the K-S and the S-W apply to different circumstances. To apply the K-S to the situation of the S-W, you'd get the Lilliefors test for normality (which allows for the effect of the parameter estimation, via simulation). Alternatively, to apply the S-W to the situation of the K-S on normal distributions you'd need to add a test for the specified mean and variance and combine the two in some way.
The Shapiro-Wilk has excellent power against a wide range of alternatives from normality.
There are other alternatives to the Shapiro-Wilk, such as the Anderson-Darling test. The Anderson-Darling is usually preferred to the K-S on the basis that it generally has better power against interesting alternatives.
If you adjust the distribution of the A-D for estimated parameters, it's reasonably competitive with the Shapiro-Wilk at the normal, but the S-W would generally be slightly preferred.