In a large skillet over medium heat, crumble and cook the ground beef with the onion and garlic for 7 minutes, or until browned.
Stir in the beef stock, worcestershire sauce, and tomato paste. Bring to a boil then reduce heat to low and simmer for 5 minutes.
In a small mixing bowl, stir together the flour and water until combined. Stir the flour mixture into the beef stock mixture. Return heat to medium and bring to a boil. Cook for 2 minutes, or until meat mixture has thickened. Add salt and pepper (if using).
Spread the meat mixture in a 9x13 casserole dish. Top with mashed potatoes and spread over the meat mixture to cover completely. Sprinkle with the cheese.
Bake for 20 minutes, or until the cheese and potatotes have lightly browned.