
Difficult to put into writing, but here goes.
Sit on a chair near to the edge, legs out with feet on the floor and lined up straight. Your legs should have enough room between them for the dog to come through.
Throw treat out away from you, bring dog into a recall between you legs and sit infront of you. If he is crooked, your legs are in the wrong position.
Move onto throwing treats to the side of you and then bring him in the same way, don't let him jump your legs.
When and only when he has this, start bending your legs so you are sitting more normally, although you will have to still sit on the edge of the chair.
Then move onto sitting/leaning on the back of the chair, legs still bent. Then onto leaning against the wall, legs still bent.
He should start learning to sit straight, as with all these methods if done correctly he can do nothing else.
This will take a long time, with still going back to these basics even when you think you have it.
Have fun
Sandra