We demonstrate two simple and inexpensive methods of using the force exerted by the light transmitted through an optical fiber to center a lens on the fiber core with submicrometer accuracy. By choosing the appropriate lens one can either focus, collimate, or defocus the light emerging from the fiber. We discuss extensions of this technique to a wider variety of lenses and light sources, including semiconductor lasers.