Oh poor little tree!
This is what I would do if it were mine:
Remove all but maybe just a couple of pears, if you don't it will surely crack a limb.
Next get a tall stake and find the lowest point on the trunk where the trunk if supported will be upright. Two stakes actually.
Then you'll want to stake it LOOSELY between the two stakes with something soft. I like used bike tubes because they have give, and wont abrade the bark.
Make sure it is only snug enough to keep it from leaning so profoundly, you want to allow the trunk freedom to move in the wind, that's what strengthens the trunk.
As far as pruning, a better time would be late winter/very early spring. In the top picture looking at the right side of your tree and counting from the bottom up I would remove the second and fourth side limbs and hope that would stimulate some buds to emerge on the opposite side. I would also shorten those limbs to maybe twelve inches or so. It looks like you have a potential leader on the right side up high (lower pic) if you feel you need to shorten the height of the tree.
This tree shows what happens when young trees in nursery's are tied tightly to a stake that limits any trunk movement. Then they are grouped together closely, both conditions which encourage
weak spindly trunk growth, and branching on one side.
Then when the tree is finally unstaked it can't support itself
and you have a tree that leans.
It's not hopeless, your tree will eventually strengthen it's trunk if allowed as much movement as possible, while being loosely supported so it can grow straight.
It will probably never have a real nice symmetry unfortunately.
Meanwhile, as hard as it is to not be able to eat those pears,
I think your best off removing them and working on helping your tree to get stronger.
Oh, and trees should never, never be staked for more than a year. And only staked if you have a wind issue or it has been poorly grown and is weak.
Whew! That was a wordy reply eh? Hope it works out, in spite of it's problem it certainly looks healthy!