Preheat the oven to 450°F and line a rimmed sheet with foil or parchment.
Cut the tomatoes in half lengthwise and lay them cut-side up on the baking sheet. Drizzle with oil, sprinkle with salt and roast for an hour, until they start to shrivel and darken on the edges.
In a large skillet set over medium-high heat, cook the bacon in a drizzle of oil until it's nicely browned. Set it aside on a plate, leaving the drippings.
Cook the shallots or onion and garlic for a few minutes, until it softens. Add the basil and cook for another minute. Add the balsamic vinegar and cook for another minute (it will reduce immediately) and then stir in the apples, browning them a bit. Add the tomatoes and cook, breaking everything apart with a spoon (mostly the tomatoes) until it thickens. It won't take long.
Season with salt and pepper and stir in the bacon. Keep cooking it, if you like, until it's thicker and softer, and try not to eat it all out of the pan as you go.