Uniswap V2 in this case uses existing tokens to automatically create pairs via a factory contract. so the pair contract and the router contract methods are set in stone and you can't change them.
the only thing you can modify is the ERC20 token you are going to use in the pair you want to create. Since Uniswap V2 uses ERC20 what you need to implement is the minimum of the interface methods described by the IERC20 interface. you can find them in the openZepplin implementation which is the most used one.
if you intend to use the router to do swaps, there are swap methods that you can use namely :
swapExactTokensForTokens and both their fee supporting versions (some tokens use extra fees and other thing so they don't transfer exactly the amounts that you pass in). there is also methods for swapping ETH for Tokens and vice versa as well as fee supporting variation of those too.