If you can't secure your ladder correctly, then you should either find a ladder that can or find a way to access your workspace that doesn't involve using a ladder.
Extension ladders don't have the built-in support of A-frames, so you sometimes need to secure an extension ladder for extra support. By securing the top, base, and sides, you can reduce the possibility of the bottom sliding out from side to side.
If your ladder doesn't have the necessary non-slip feet, you can either attach it to an existing structure or you can create your very own by driving a stake through the ground. If you're using a wooden deck, you can also use a temporary cleat to provide a solid backstop for your ladder.
The Canadian Centre for Injury Prevention provides more tips for securing a ladder