Heat the oil in a nonstick frying pan, add the onions and chilli flakes, season well and cook over a low heat for 15 minutes or until very soft and lightly browned. Add the garlic and cook for a further couple of minutes.
Meanwhile, cook the lentils in a saucepan of simmering water according to the pack instructions, then drain.
While the onions and lentils are cooking, cook the pasta in a large saucepan of salted boiling water according to the pack instructions until al dente. Add the kale 3 minutes before the end of the cooking time and cook until tender. Drain, reserving a little of the cooking water, and return to the pan. Toss together with the lentils, adding a little cooking water to loosen if needed.
Spoon into serving bowls and serve scattered with the caramelized onions.