You can work safely on an extension ladder if you use it properly. Here are a few tips:
To set the ladder up, put the bottom against the wall and then walk it vertically, hand over hand like this until the top is against the wall. Then grab the bottom and pull it out.
Here's a simple test you can do to make sure that the ladder is at the proper angle. Stand with your toes right up against the base of the ladder and stretch your arms out straight at shoulder height. You should be able to grasp a rung. If it's too close or you can't reach it that means you need to readjust the angle of the ladder.
When climbing a ladder, always keep both hands either on the rungs or on the side rail. When you're working on a ladder, avoid overreaching to the side. A good rule of thumb, always keep your belt buckle inside the rails.