This paper studies a reliability modeling for a $k$ -out-of- $n$ : $F$ load sharing system that operates in a shock environment. Such a system consists of a protective device and $n$ components with load sharing. The base hazard rate of the loading sharing system is affected by random shocks and the protective device. Random shocks can be classified into two types: invalid shock and valid shock. An invalid shock has no influence on the system whereas a valid shock makes the base hazard rate larger. The system fails, if the number of failed components is at least $k$ , the system suffers at least $M$ random shocks or the protective device fails, whichever occurs first. A Markov process is used to evaluate system reliability in this paper. A distributed computer system is given to show application of the proposed model.