We study a simplified model of the electronic structure of compounds of the type of La$_{1-x}$Sr$_x$MnO$_3$. The model represents each Mn$^{4+}$ ion by a spin S=1/2, on which an electron can be added to produce Mn$^{3+}$. We include two strong intratomic interactions in the Hamiltonian: exchange ($J$% ) and Coulomb ($U$). Finally, to represent the effect of Sr substitution by La in a simple way, we include a distribution of diagonal energies at the Mn sites. Then we use Green function techniques to calculate a mobility edge and the average density of states. We find that according to the amount of disorder and to the concentration of electrons in the system, the Fermi level can cross the mobility edge to produce a metal to insulator transition as the magnetization decreases (increase of temperature). If the disorder is large, the system remains insulating for all concentrations. Concentrations near zero or one favor the insulating state while intermediate values of concentration favor the metallic state.