Principal-Agent Settings with Random Shocks