In a small pan, add olive oil, garlic, and rosemary, and warm it up until the oil starts to bubble around the garlic, stirring it occasionally. You do not have to brown the garlic. This is done only to give extra flavor to the oil. Keep it aside and let it cool.
⅔ cup Olive oil, 5 to 7 cloves Garlic, 1 to 2 tablespoon Rosemary