We present the near-infrared luminosity and stellar mass functions of galaxies in the core of the Shapley supercluster at z =0.048 , based on new K -band observations carried out at the United Kingdom Infra-Red Telescope with the Wide Field Infrared Camera in conjunction with B - and R -band photometry from the Shapley Optical Survey , and including a subsample ( \sim 650 galaxies ) of spectroscopically confirmed supercluster members . These data sets allow us to investigate the supercluster galaxy population down to M _ { K } ^ { \star } +6 and \mathcal { M } =10 ^ { 8.75 } M _ { \odot } . For the overall 3 deg ^ { 2 } field the K -band luminosity function ( LF ) is described by a Schechter function with M _ { K } ^ { \star } =–24.96 \pm 0.10 and \alpha =–1.42 \pm 0.03 , a significantly steeper faint-end slope than that observed in field regions . We investigate the effect of environment by deriving the LF in three regions selected according to the local galaxy density , and observe a significant ( 2 \sigma ) increase in the faint-end slope going from the high- ( \alpha =–1.33 ) to the low-density ( \alpha =–1.49 ) environments , while a faint-end upturn at M _ { K } > –21 becomes increasingly apparent in the lower density regions . The galaxy stellar mass function ( SMF ) is fitted well by a Schechter function with log _ { 10 } ( \mathcal { M } ^ { \star } ) =11.16 \pm 0.04 and \alpha =–1.20 \pm 0.02 . The SMF of supercluster galaxies is also characterised by an excess of massive galaxies that are associated to the brightest cluster galaxies . While the value of \mathcal { M } ^ { * } depends on environment increasing by 0.2 dex from low- to high-density regions , 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 \mathcal { M } =10 ^ { 9 } M _ { \odot } , 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 these dwarf galaxies , which are easier to strip than their more massive counterparts , are affected by tidal/gas stripping upon entering the supercluster environment .