  We discuss the possibility that gamma-ray bursts result from internal shocks
in an ultra-relativistic matter. Using a simple model we calculate the temporal
structure and we estimate the efficiency of this process. In this model the
ultra-relativistic matter flow is represented by a succession of shells with
random values of the Lorentz factor. We calculate the shocks that take place
between those shells and we estimate the resulting emission. Internal shocks
can produce the highly variable temporal structure observed in most of the
bursts provided that the source emitting the relativistic flow is highly
variable. The observed peaks are in almost one to one correlation to the
activity of the emitting source. A large fraction of the kinetic energy is
converted to radiation. The most efficient case is when an inner engine
produces shells with comparable energy but very different Lorentz factors. It
also gives the most preferable temporal structure.
