How do scientists determine if a star's color is due to Doppler shift vs the star's composition vs temperature? When looking at visible light coming from, say a star, scientists can determine by the shifting of the light towards the red or the blue end of the spectrum to determine if it is moving towards or away from earth. But they can also look at the light as it falls on the visible spectrum to determine the composition of said star. How do they determine if the light landing on the red end of the spectrum, for example, means it's moving away vs the composition of the star? How do they tell the difference? 

In addition, how is all this reconciled with the fact that a star's color is also based on it's temperature?

Note: Question was expanded to include temperature after comments and updated answer subsequent to my original question asking only about motion vs composition.
The colour of a star is due mostly to its temperature. Except at extreme velocities, the red-shift won't affect the light enough to change the visible colour. To detect a red or blue shift you need some marker in the spectrum that can be measured accurately. 

The spectrum of light from a star will contain dark lines, called Fraunhofer lines, which are due to the absorption of light at particular wavelengths by gases in the star's atmosphere. The wavelengths at which these lines appear are known very finely, for example sodium causes a line at 589.592nm . If the star is moving, the light, along with the Fraunhofer lines is red- or blueshifted.



The presence of these line shows the composition of the star's atmosphere.
Measurement of the position of the lines allows for accurate measurement of the Doppler shift of a star. 

A cool, red star which is stationary will have the Fraunhofer lines in the same position as a hot stationary blue star. The motion of the star is measured by the position of the Fraunhofer lines, not the colour of the star.