Melt 2 tablespoons butter in a skillet over medium heat. Add onions and shallots, saute until softened, about 5 minutes. Transfer onion mixture to a plate, set aside.
Return skillet to heat, add chicken livers and saute until livers are barely pink in the middle (well done livers can be bitter).
In the bowl of a food processor, add chicken livers, sauteed onion mixture, salt, pepper, fresh thyme leaves, coconut milk and remaining 2 tablespoons of butter, process until smooth.