We consider an interacting system of massless scalar and electromagnetic fields, with the Lagrangian explicitly depending on the electromagnetic potentials, i.e., interaction with broken gauge invariance. The Lagrangian for interaction is chosen in such a way that the electromagnetic field equation acquires an additional term, which in some cases is proportional to the vector potential of the electromagnetic field. This equation can be interpreted as the equation of motion of photon with induced nonzero rest-mass. This system of interacting fields is considered within the scope of Bianchi type-I (BI) cosmological model. It is shown that, as a result of interaction the isotropization process of the expansion takes place.