Having a video of your feet taken from behind as you walk on the treadmill would enable you to choose the right shoe. Instructions on doing this are on
www.runningwarehouse.com under "gait analysis" on the right side of the page. At a running store you can also find out whether your feet turn IN or OUT (at the ankles).
If you google it, there are more guides online for to find out what shoe you need - that could stop the knee pain.