  We present the NIR luminosity (LF) and stellar mass functions (SMF) of
galaxies in the core of the Shapley supercluster at z=0.048, based on new
K-band observations in conjunction with B- and R-band photometry and a
subsample of ~650 galaxies spectroscopically confirmed supercluster members,
allowing to investigate the galaxies down to M_K^*+6 and M=10^8.75 M_sun. For
the 3 deg^2 field the K-band LF is described by a Schechter function with
M_K^*=-24.96+-0.10 and \alpha=-1.42+-0.03. We investigate the effect of
environment by deriving the LF in three regions selected according to the local
galaxy density, and observe a significant increase in the faint-end slope going
from the high- (\alpha=-1.33) to the low-density (\alpha=-1.49) environments.
The SMF is fitted well by a Schechter function with log_10(M^*)=11.16+-0.04 and
\alpha=-1.20+-0.02. The SMF of supercluster galaxies is also characterised by
an excess of massive galaxies that are associated to the cluster BCGs. While
the value of M* depends on environment the slope of the galaxy SMF does not
vary with the environment. By comparing our findings with cosmological
simulations, we conclude that the environmental dependences of the LF are not
primary due to variations in the merging histories, but to processes which are
not treated in the semi-analytical models, such as tidal stripping or
harassment. In field regions the SMF shows a sharp upturn below M=10^9 M_sun,
close to our mass limit, suggesting that the upturns seen in our K-band LFs,
but not in the SMF, are due to this dwarf population. The environmental
variations seen in the faint-end of the K-band LF suggests that dwarf galaxies,
which are easier to strip than their more massive counterparts, are affected by
tidal/gas stripping upon entering the supercluster.
