Heat olive oil in frying pan, add garlic and onions and cook until golden brown. Add thinly sliced ham to garlic and onions, stirring occasionally, and cook until ham is crispy. Reserve 2 to 3 cups of pasta water, drain pasta and peas and return to pot. Over low heat, add Cannellini beans with their juice, 1 1/2 cups of the reserved pasta water and the ham, onions and garlic to the pasta and peas. Use 1/2 cup of remaining reserved pasta water to deglaze the frying pan and add to pasta. Heat until sauce comes to a slight boil. If you like your pasta with more sauce, add more of the reserved pasta water.