  The seminal Batchelor-Green's (BG) theory on the hydrodynamic interaction of
two spherical particles of radii a suspended in a viscous shear flow neglects
the effect of the boundaries. In the present paper we study how a plane wall
modifies this interaction. Using an integral equation for the surface traction
we derive the expression for the particles' relative velocity as a sum of the
BG's velocity and the term due to the presence of a wall at finite distance,
z_0. Our calculation is not the perturbation theory of the BG solution, so the
contribution due to the wall is not necessarily small. The distance at which
the wall significantly alters the particles interaction scales as z_0^{3/5}.
The phase portrait of the particles' relative motion is different from the BG
theory, where there are two singly-connected regions of open and closed
trajectories both of infinite volume. For finite z_0, there is a new domain of
closed (dancing) and open (swapping) trajectories. The width of this region
behaves as 1/z_0. Along the swapping trajectories, that have been previously
observed numerically, the incoming particle is turning back after the encounter
with the reference particle, rather than passing it by, as in the BG theory.
The region of dancing trajectories has infinite volume. We found a
one-parameter family of equilibrium states, overlooked previously, whereas the
pair of spheres flows as a whole without changing its configuration. These
states are marginally stable and their perturbation yields a two-parameter
family of the dancing trajectories, where the particle is orbiting around a
fixed point in a frame co-moving with the reference particle. We suggest that
the phase portrait obtained at z_0>>a is topologically stable and can be
extended down to rather small z_0 of several particle diameters. We confirm
this by direct numerical simulations of the Navier-Stokes equations with
z_0=5a.
