Decide a Dose
How much your dose is will be decided by the size of your basket. Some portafilters may only have one basket, but if you have multiple, the standard is usually a double, but feel free to use whatever you'd like. As shown above, use a dose of 7-10 g of ground coffee for single baskets, 16-18g for double baskets, and 20-22g for triple baskets. Make sure your portafilter and basket are dry before grinding coffee into them.
Depending on the tools you have available, you can manually grind your coffee into the basket on a scale, or use an automatic grinder with measuring options. If done manually, place your portafilter on the scale and reset the measurement. It should display as 0g with the portafilter on it. Grind your coffee into the basket, and then place the portafilter back on the scale to display the measurement of the grounds only. If you have an automatic grinder with measuring options you will have to check your machines user manual for specifics on use.