BeginPackage["OptionUse`"]

g::usage = "g[n, options...] serves as an example for using options."

Opt1::usage = "Opt1 is an option of g[]."

Opt2::usage = "Opt2 is another option of g[]."

Options[g] = {Opt1 -> val1, Opt2 -> val2}

Begin["`Private`"]

g[ n_, opts___Rule ] :=
Block[ {opt1, opt2},
opt1 = Opt1 /. {opts} /. Options[g];
opt2 = Opt2 /. {opts} /. Options[g];
{n, opt1, opt2}
]

End[]

EndPackage[]