Melt butter in a large skillet over medium heat; cook and stir garlic, rosemary, and basil in the hot butter until garlic is fragrant and beginning to brown, about 5 minutes. Stir lemon juice, white wine, salt, and black pepper into butter and garlic.
Arrange about 6 shrimp onto each square of aluminum foil and drizzle the butter and herb mixture over shrimp. Gather up the corners of the foil squares and twist the tops to form tight packets.
Grill the packets on the preheated grill until shrimp are opaque and pink, 10 to 12 minutes.