I develop a macroeconomic model in which banks can affect loan quality by exerting costly screening effort. Informational frictions limit the amount of external funds that banks can raise. In this framework, I consider two types of financial intermediation: traditional banking and shadow banking. By pooling different loans, shadow banks achieve a higher endogenous leverage compared to traditional banks, increasing credit availability. However, shadow banks also make the financial sector more fragile because of the lower quality of the loans they finance and because of their exposure to bank runs. In this setting, unconventional monetary policy can reduce macroeconomic instability. (JEL E32, E44, E52, G01, G21, G23, L25)