In this paper we give the first attempt to model the evolution of the spectrum of PSR B1259$-$63 radio emission while the pulsar orbits the companion Be star. As suggested by Kijak et al. (Mon. Not. R. Astron. Soc. 418:L114, 2011a) this binary system can be useful in understanding the origin of the gigahertz-peaked spectrum of pulsars. The model explains, at least qualitatively, the observed alterations of the spectral shape depending on the orbital phases of this pulsar. Thus, our results support the hypothesis that the external factors have a significant impact on the observed radio emission of a pulsar. The model can also contribute to our understanding of the origin of some non-typical spectral shapes(e.g. flat or broken spectra).