Your idea is not correct, your not allowed to use extension cord for a permant installation.
One option is to get this type of extension ring http://www.tnb-canada.com/en/catalog...xes_04_eng.pdf
Go down and look at the 1110r. If you find one these you can put this on your exisitng plug. This will bring out the box past your wall, then you will be able to run whatever type of wire you need(romex, bx, or even pipe) out of the extension ring.
There have been a lot of fires caused by extension cords and the like!
And electricity wired wrong still works!
The safest way to do this would be to read a book on home electrical wiring cover to cover (sold at home improvement stores). Get one with plenty of pictures so you can see how wiring is typically done.
Safer is to make a simple wiring diagram of what you plan to do, then get an electrical permit from your city or county. Then have an electrical inspector check your work to be sure it is safe. Not too much cost for a small project.