Corporate governance problems are used to justify a comprehensive treatment of corporate finance, starting from a simple principal agent problem
inside the firm to a complex general equilibrium model with insiders, outsiders, and regulators.
Both kinds of principal agent problem do not allow the principal to observe the agents action, however there are important differences in the outcomes the principal can observe: In the first kind of problem the principal can observe what he truly cares about--how many shoes are sold- and incentives can closely replicate first best outcomes; In the second kind of problem the principal cannot observe what he truly cares about critical thinking- but only something correlated to it--test scores-.
Later analyses of the principal agent problem began with the demonstration that in more complex environments, incentives actually had to be more simple to prevent the agent "gaming" the incentive scheme [Hohnstrom and Milgrom (1987, 1991)].
The solution to a principal agent problem is to provide the agent with incentives to align his interests with those of the principal.
The term moral hazard is sometimes used by economists to refer to a broader class of principal agent problems more precisely referred to as "hidden action" problems, where the principal cannot observe the agents action.