In models with complete markets, targeting core inflation enables monetary policy to maximize welfare by replicating the flexible price equilibrium. In this paper, we develop a twosector two-good closed economy new Keynesian model to study the optimal choice of price index in markets with financial frictions. Financial frictions that limit credit-constrained consumers' access to financial markets make demand insensitive to interest rate fluctuations. The demand of credit-constrained consumers is determined by their real wage, which depends on prices in the flexible price sector. Thus, prices in the flexible price sector influence aggregate demand and, for monetary policy to have its desired effect, the central bank has to stabilize price movements in the flexible price sector. Also, in the presence of financial frictions, stabilizing core inflation is no longer equivalent to stabilizing output fluctuations. Our analysis suggests that in the presence of financial frictions a welfaremaximizing central bank should adopt flexible headline inflation targeting - a target based on headline rather than core inflation, and with some weight on the output gap. We discuss why these results are particularly relevant for emerging markets, where the share of food expenditures in total consumption expenditures is high and a large proportion of consumers are credit-constrained.