Bring the tenderloin to room temperature about half an hour before cooking. Preheat the oven into 380°F. Peel and chop the shallots and garlic. Peel the pears and cube them. Sauté the shallots and garlic in a pan in a drop of oil for a few minutes. Combine with the pear cubes and season with salt and pepper. Cut the tenderloin lengthwise through the center but do not cut all the way through. Season with salt and pepper. Stuff with the pear mixture. Slice the cheese. Place the cheese on top of the stuffing along with the rosemary. Tie the tenderloin loosely. Brown the pork in a butter and oil mixture in a pan. Turn the tenderloin during searing and try to keep the cheese from touching the pan. Season the surface of the meat with salt and pepper. Insert a thermometer into the thickest part of the meat, avoiding the stuffing. Bake until the thermometer reads 150°F. Wrap the meat in tin foil and let rest for 15 minutes before cutting.