Imagine a spiral galaxy where the rotation of gas and stars within the disk is close to circular (generally true for gas clouds, though less true for stars) in a single plane (the disk), and imagine that it is tilted at some intermediate angle with respect to your line of sight. A circular disk galaxy will then project to form an apparent ellipse, with a major axis and a minor axis (see figure).
If you look at points which lie along the minor axis (say, points b1 or b2), you will see stars and clouds which are moving perpendicular to your line of sight, so they have zero radial velocity relative to you, and there will be no Doppler shift.
If, instead, you look at points which lie along the major axis (say, points a1 or a2), your line of sight will intersect gas clouds and stars which are moving (mostly) along your line of sight (either towards you or away from you), so you will observe the maximum possible radial velocity and thus the maximum possible Doppler shift (either positive = velocities away from you, or negative = velocities toward you).
There's one further factor, which is the effect of inclination. If the galaxy is genuinely face-on (inclination $i = 0$), then you won't seem any Doppler shifts, because all the motion is in the plane of the sky, perpendicular to your line of sight. (In practice there will really be some motions up and down with respect to the galaxy plane, but this won't tell you about the rotation curve.) If the galaxy is edge-on, then you get the maximum possible Doppler shift, which gives you the rotation velocity $V$ directly. If the galaxy has an in-between inclination, then the radial velocity is the part of the cloud/star velocity in the direction of your line of sight, which is $V \sin i$. So if you can determine the galaxy's inclination, you can divide the observed velocity along the major axis by $\sin i$ to get $V$.
Up until relatively recently, the practice (in optical astronomy) was to use a long-slit spectrograph and orient it so that the slit lies along the galaxy's major axis. Then at each point along the major axis, from the center outward, you measure the Doppler shift, apply the $\sin i$ inclination correction, and then you have the rotation curve: $V$ as a function of radius $r$ along the major axis.
If you have fully two-dimensional spectroscopy (e.g., from a radio telescope interferometric array observing emission from atomic hydrogen or molecular gas, or an optical or infrared integral field spectrograph), then you can use the data at intermediate locations within the disk (not just along the major axis), where the observed velocity is $= V \sin i \cos \alpha$, where $\alpha$ is the angle between the major axis and the location you're looking at (so for locations on the major axis, the observed velocity is just $V \sin i$). Then you can fit a model to the set of observed velocities (which you get from the Doppler shifts) and work out $V$ as a function of radius. (The standard approach is called a "tilted ring" model, where you assume the velocity is a simple function of radius, but allow for the possibility that the disk might be warped, so that the orientation -- including the inclination -- might change with radius.)