Add about 4 inches of cold water (enough to cover the spaghetti) to a large pot and bring it to a boil. Season with a pinch of salt.
Toast the pepper in a medium to large skillet over medium heat until fragrant, about 1-2 minutes. Transfer to a bowl and set aside to cool.
Mix together the butter, cheese and cooled pepper until it forms a smooth paste.
Drop the spaghetti into boiling water and cook according to the package directions, about 8 minutes.
While the pasta cooks, add one large ladle of pasta water to the same pan you toasted the pepper in, but off of the heat.
Stir in the cheese mixture until it's smooth and saucy. Drain the pasta when it's just barely al dente, but reserve at least a cup of pasta water first.
Immediately add the pasta to the pan over low heat while tossing it around to coat in the sauce. It's important to keep the heat low and move the pasta constantly at this step to prevent clumpy cheese.
Continue stirring and tossing until the sauce thickens to the right consistency. Add more pasta water as needed, and remove from the heat as soon as it's done.
Taste for seasoning, then transfer the pasta to bowls, top with freshly cracked pepper and grated pecorino, then serve immediately.