Preheat oven to 450 degrees F. Toss corn and oil to coat and spread out on a large baking sheet. Bake, stirring once, until some kernels begin to brown, about 20 minutes. Combine basil, shallot, vinegar, salt and pepper in a medium bowl. Add the corn; toss to coat. Serve warm or cold.