Other work completed on the space walk included replacing a broken computer and fixing a mechanism that will let a robotic spacecraft capture the telescope in the future, so it's not left floating around in space forever.
Hubble Space Telescope
Launched 600km above the Earth in 1990
15.9m long; 4.2m wide; weighs 11,110kg
Made more than 93,000 trips around our planet
Looked at more than 24,000 things in space
The mission is considered to be pretty risky by space experts as the telescope is a long way from the International Space Station.
That means if something goes wrong, the astronauts can't go to the space station for help.
But space agency Nasa have got another shuttle - the Endeavour - ready to blast off to rescue the crew if required.
If everything goes to plan, the updated telescope will be 90 times more powerful than it originally was and should last until at least 2014.